Chinaunix

标题: 有关linux中Qt designer的使用问题 [打印本页]

作者: caffee_1989    时间: 2011-04-10 19:01
标题: 有关linux中Qt designer的使用问题
我用的是GT2440的板,现在刚使用QT,问题就出现了:我的Qt环境是按照使用手册建立的,它提供了arm-qtopia_2.2.0.tar.gz这样一个包,详细步骤就不说了。板提供了hello的例子,它里面有个脚本build,直接执行./build就能生成执行文件,build内容如下:

#!/bin/bash

source /opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/setQpeEnv
qmake -spec /opt/GTStudio/GT2440/arm-qtopia/qtopia-2.2.0/qtopia/mkspecs/qws/linux-arm-g++ -o Makefile *.pro

make clean
make
一开始执行./build 还可以生成可执行文件,但如果我打开qt designer编辑过.ui文件后。譬如移动一下按键pushbutton,再保存,执行./build就出现很多错误。有没有人知道这是什么原因呢?其中我发现 .ui  .moc等文件夹没生成hello_base.cpp文件并且hello_base.h里面编程空的。有没有人遇到这种情况?
错误信息:
In file included from hello.cpp:1:
hello.h:6: error: expected class-name before '{' token
hello.h:8: error: expected `)' before '*' token
hello.cpp:4: error: 'WFlags' has not been declared
hello.cpp:4: error: prototype for 'HelloForm::HelloForm(QWidget*, const char*, int)' does not match any in class 'HelloForm'
hello.h:6: error: candidates are: HelloForm::HelloForm(const HelloForm&)
hello.h:6: error:                 HelloForm::HelloForm()
hello.cpp: In member function 'virtual void HelloForm::SayHello()':
hello.cpp:14: error: 'MessageLabel' was not declared in this scope
make: *** [.obj/release-shared/hello.o] Error 1




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2