主题 : 手把手教你开发qtopia应用程序 (通用版本) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 37980
精华: 0
发帖: 32
金钱: 160 两
威望: 32 点
贡献值: 0 点
综合积分: 64 分
注册时间: 2011-02-19
最后登录: 2015-04-04
30楼  发表于: 2011-08-14 23:00
在楼主和eddylau的启发下终于弄明白了整个的开发流程了,多谢了,其实
eddylau“不要自行用uic来把*.ui档转化为*.cpp及*.h档,这件事情会在运行build脚本时自动完成,
   只不过转化出来的*.cpp及*.h档,是储存在一个hidden folder内(用ls -a便可看见).
   不要更改这些档案来实行程序所需的功能,正确的做法是自行编写一个子类来继承由
   Qt designer设计的那个Form,这样一来便可调用其上的所有控件.这点是整个开发过程
   的重点所在.”说得精辟啊~~~~
级别: 新手上路
UID: 30090
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
贡献值: 0 点
综合积分: 72 分
注册时间: 2010-10-11
最后登录: 2014-04-13
31楼  发表于: 2011-10-09 00:06
谢谢了 呵呵
级别: 侠客
UID: 49706
精华: 0
发帖: 50
金钱: 255 两
威望: 51 点
贡献值: 0 点
综合积分: 100 分
注册时间: 2011-06-14
最后登录: 2012-02-14
32楼  发表于: 2011-10-12 15:49
老是出现这个错误,看坛子里面有人解决了,但没有说怎么解决的,希望大牛能够解答,谢谢!!!
main_form.h:8: 错误:‘WFlags’未声明
main_form.h:8: 错误:‘WType_TopLevel’在此作用域中尚未声明
级别: 新手上路
UID: 44428
精华: 0
发帖: 14
金钱: 70 两
威望: 14 点
贡献值: 0 点
综合积分: 28 分
注册时间: 2011-04-25
最后登录: 2012-05-13
33楼  发表于: 2011-10-20 18:23
终于成功了,感谢楼主,灰常感谢
樂觀的罐子
级别: 侠客
UID: 51338
精华: 0
发帖: 59
金钱: 300 两
威望: 60 点
贡献值: 0 点
综合积分: 118 分
注册时间: 2011-07-02
最后登录: 2015-09-23
34楼  发表于: 2011-11-20 23:28
鼓掌!!
级别: 新手上路
UID: 59244
精华: 0
发帖: 4
金钱: 20 两
威望: 4 点
贡献值: 0 点
综合积分: 8 分
注册时间: 2011-11-21
最后登录: 2012-04-25
35楼  发表于: 2011-11-23 11:02
请问 .destop 怎样生成啊 放在哪里啊
级别: 侠客
UID: 45756
精华: 0
发帖: 56
金钱: 290 两
威望: 58 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2011-05-07
最后登录: 2016-01-25
36楼  发表于: 2011-11-25 13:54
级别: 新手上路
UID: 3625
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
贡献值: 0 点
综合积分: 38 分
注册时间: 2009-01-26
最后登录: 2013-07-05
37楼  发表于: 2011-12-09 09:58
  請問大大,有沒有做qt4 + mini2440的教程呢 ?
级别: 新手上路
UID: 67737
精华: 0
发帖: 4
金钱: 20 两
威望: 4 点
贡献值: 0 点
综合积分: 8 分
注册时间: 2012-04-14
最后登录: 2012-04-30
38楼  发表于: 2012-04-14 22:08
LZ我按照你的步骤一步一步弄并且重复了一个晚上,最终在最后一步出错,解决不掉。下面是出错的信息。
[root@localhost test]# ./build
Makefile:171: warning: overriding commands for target `.obj/release-shared/test.o'
Makefile:163: warning: ignoring old commands for target `.obj/release-shared/test.o'
Makefile:192: warning: overriding commands for target `.moc/release-shared/moc_test.cpp'
Makefile:189: warning: ignoring old commands for target `.moc/release-shared/moc_test.cpp'
rm -f .obj/release-shared/moc_test.o .obj/release-shared/moc_testform.o
rm -f .moc/release-shared/moc_test.cpp .moc/release-shared/moc_testform.cpp
rm -f .ui/release-shared/testform.cpp .ui/release-shared/testform.h
rm -f .obj/release-shared/test.o .obj/release-shared/main.o .obj/release-shared/test.o .obj/release-shared/testform.o
rm -f *~ core *.core
Makefile:171: warning: overriding commands for target `.obj/release-shared/test.o'
Makefile:163: warning: ignoring old commands for target `.obj/release-shared/test.o'
Makefile:192: warning: overriding commands for target `.moc/release-shared/moc_test.cpp'
Makefile:189: warning: ignoring old commands for target `.moc/release-shared/moc_test.cpp'
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic testform.ui -o .ui/release-shared/testform.h
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"test\" -DQTOPIA_TRTARGET=\"test\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/test.o test.cpp
../qtopia-2.2.0-FriendlyARM/qt2/include/qtooltip.h:87: warning: ‘class QToolTip’ has virtual functions but non-virtual destructor
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"test\" -DQTOPIA_TRTARGET=\"test\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
../qtopia-2.2.0-FriendlyARM/qt2/include/qdatetime.h:51: warning: ‘class QDate’ has virtual functions but non-virtual destructor
../qtopia-2.2.0-FriendlyARM/qtopia/include/qtopia/../../src/libraries/qtopia/qcom.h:88: warning: ‘struct QUnknownInterface’ has virtual functions but non-virtual destructor
../qtopia-2.2.0-FriendlyARM/qtopia/include/qtopia/../../src/libraries/qtopia/qcom.h:100: warning: ‘struct QLibraryInterface’ has virtual functions but non-virtual destructor
../qtopia-2.2.0-FriendlyARM/qtopia/include/qtopia/../../src/libraries/qtopia/applicationinterface.h:49: warning: ‘struct ApplicationInterface’ has virtual functions but non-virtual destructor
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic testform.ui -i testform.h -o .ui/release-shared/testform.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"test\" -DQTOPIA_TRTARGET=\"test\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/testform.o .ui/release-shared/testform.cpp
../qtopia-2.2.0-FriendlyARM/qt2/include/qtooltip.h:87: warning: ‘class QToolTip’ has virtual functions but non-virtual destructor
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc test.h -o .moc/release-shared/moc_test.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"test\" -DQTOPIA_TRTARGET=\"test\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/moc_test.o .moc/release-shared/moc_test.cpp
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc .ui/release-shared/testform.h -o .moc/release-shared/moc_testform.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"test\" -DQTOPIA_TRTARGET=\"test\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/moc_testform.o .moc/release-shared/moc_testform.cpp
g++  -o test .obj/release-shared/test.o .obj/release-shared/main.o .obj/release-shared/test.o .obj/release-shared/testform.o .obj/release-shared/moc_test.o .obj/release-shared/moc_testform.o   -lqtopia2 -lqtopia -lqpe -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/lib -lqte
.obj/release-shared/test.o: In function `TestForm::~TestForm()':
test.cpp:(.text+0x0): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x0): first defined here
.obj/release-shared/test.o: In function `TestForm::~TestForm()':
test.cpp:(.text+0x2c): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x2c): first defined here
.obj/release-shared/test.o: In function `TestForm::~TestForm()':
test.cpp:(.text+0x46): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x46): first defined here
.obj/release-shared/test.o: In function `TestForm::TestForm(QWidget*, char const*, unsigned int)':
test.cpp:(.text+0x60): multiple definition of `TestForm::TestForm(QWidget*, char const*, unsigned int)'
.obj/release-shared/test.o:test.cpp:(.text+0x60): first defined here
.obj/release-shared/test.o: In function `TestForm::TestForm(QWidget*, char const*, unsigned int)':
test.cpp:(.text+0x1ca): multiple definition of `TestForm::TestForm(QWidget*, char const*, unsigned int)'
.obj/release-shared/test.o:test.cpp:(.text+0x1ca): first defined here
.obj/release-shared/testform.o: In function `TestForm::~TestForm()':
testform.cpp:(.text+0x0): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x0): first defined here
.obj/release-shared/testform.o: In function `TestForm::~TestForm()':
testform.cpp:(.text+0x2c): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x2c): first defined here
.obj/release-shared/testform.o: In function `TestForm::~TestForm()':
testform.cpp:(.text+0x46): multiple definition of `TestForm::~TestForm()'
.obj/release-shared/test.o:test.cpp:(.text+0x46): first defined here
.obj/release-shared/testform.o: In function `TestForm::TestForm(QWidget*, char const*, unsigned int)':
testform.cpp:(.text+0x60): multiple definition of `TestForm::TestForm(QWidget*, char const*, unsigned int)'
.obj/release-shared/test.o:test.cpp:(.text+0x60): first defined here
.obj/release-shared/testform.o: In function `TestForm::TestForm(QWidget*, char const*, unsigned int)':
testform.cpp:(.text+0x1ca): multiple definition of `TestForm::TestForm(QWidget*, char const*, unsigned int)'
.obj/release-shared/test.o:test.cpp:(.text+0x1ca): first defined here
.obj/release-shared/moc_testform.o: In function `TestForm::className() const':
moc_testform.cpp:(.text+0x0): multiple definition of `TestForm::className() const'
.obj/release-shared/moc_test.o:moc_test.cpp:(.text+0x0): first defined here
.obj/release-shared/moc_testform.o: In function `TestForm::staticMetaObject()':
moc_testform.cpp:(.text+0x52): multiple definition of `TestForm::staticMetaObject()'
.obj/release-shared/moc_test.o:moc_test.cpp:(.text+0x52): first defined here
.obj/release-shared/moc_testform.o:(.bss+0x0): multiple definition of `TestForm::metaObj'
.obj/release-shared/moc_test.o:(.bss+0x0): first defined here
.obj/release-shared/moc_testform.o: In function `TestForm::tr(char const*, char const*)':
moc_testform.cpp:(.text+0x9c): multiple definition of `TestForm::tr(char const*, char const*)'
.obj/release-shared/moc_test.o:moc_test.cpp:(.text+0x9c): first defined here
.obj/release-shared/moc_testform.o: In function `TestForm::tr(char const*)':
moc_testform.cpp:(.text+0xc6): multiple definition of `TestForm::tr(char const*)'
.obj/release-shared/moc_test.o:moc_test.cpp:(.text+0xc6): first defined here
.obj/release-shared/moc_testform.o: In function `TestForm::initMetaObject()':
moc_testform.cpp:(.text+0xf0): multiple definition of `TestForm::initMetaObject()'
.obj/release-shared/moc_test.o:moc_test.cpp:(.text+0xf0): first defined here
collect2: ld returned 1 exit status
make: *** [test] Error 1
级别: 新手上路
UID: 64748
精华: 0
发帖: 27
金钱: 135 两
威望: 27 点
贡献值: 0 点
综合积分: 54 分
注册时间: 2012-03-09
最后登录: 2012-10-09
39楼  发表于: 2012-05-26 17:07
留个足迹。。。