主题 : mini2440上qtopia应用程序开发步骤(x86-qtopia版本) 复制链接 | 浏览器收藏 | 打印
创新改变世界,技术驱动中国
级别: 论坛版主
UID: 7752
精华: 2
发帖: 55
金钱: 570 两
威望: 276 点
贡献值: 20 点
综合积分: 150 分
注册时间: 2009-07-27
最后登录: 2010-03-30
20楼  发表于: 2009-10-11 09:10
大家在具体操作时,尽量使用介绍的简便方法
级别: 侠客
UID: 7805
精华: 0
发帖: 52
金钱: 345 两
威望: 111 点
贡献值: 0 点
综合积分: 104 分
注册时间: 2009-07-29
最后登录: 2012-11-21
21楼  发表于: 2009-10-21 17:09
进入qtopia-2.2.0-FriendlyARM/qt2/bin,启动Qt designer # ./designer,即可以进行图形界面的设计----这步的bin文件内没有designer。。怎么回事?
我要资源。
级别: 新手上路
UID: 9656
精华: 0
发帖: 20
金钱: 160 两
威望: 68 点
贡献值: 0 点
综合积分: 40 分
注册时间: 2009-10-09
最后登录: 2010-10-06
22楼  发表于: 2009-11-04 16:36
hxfirefox  LZ
我要感谢你。这几天急着做QT的东西。我用的是micro2440的。这几天找了好久关于友善的qt开发使用方法。唉,踏破铁鞋无觅处。你的这篇写的真是太好了。


不过,楼主,我还得请教您一个问题。我编写好的程序如何在arm-qtopia里面交叉编译呢|?或者说我编写好的程序如何编译成开发板可以执行的程序?
希望您能详细的给我说下。谢谢。
级别: 新手上路
UID: 9656
精华: 0
发帖: 20
金钱: 160 两
威望: 68 点
贡献值: 0 点
综合积分: 40 分
注册时间: 2009-10-09
最后登录: 2010-10-06
23楼  发表于: 2009-11-04 16:54
晕。看了这个版的帖子,才发现原来楼主已经把arm上的写出来了。唉。感谢了。
楼主,我遇到新的问题,我发现我自己写了一个helloworld.结果按照您的简便方法
#qmake  -project
后。文件夹里面出现了2个.pro文件,一个以我的文件夹命名,一个以我的C文件命名。
然后我就把2个pro文件后面都加上了TARGET
然后copy他自带的hello的build过来,然后  ./build。
以外的出现很多错误

../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:254: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘QPixmap’
../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:271: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:276: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘QPixmap’
../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:294: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token
../qtopia-2.2.0-FriendlyARM/qt2/include/qpixmap.h:295: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token
In file included from ../qtopia-2.2.0-FriendlyARM/qt2/include/qpushbutton.h:43,
                 from test.c:2:
../qtopia-2.2.0-FriendlyARM/qt2/include/qiconset.h:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘QIconSet’
In file included from test.c:2:
../qtopia-2.2.0-FriendlyARM/qt2/include/qpushbutton.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘QPushButton’
test.c: In function ‘main’:
test.c:6: error: ‘QApplication’ undeclared (first use in this function)
test.c:6: error: (Each undeclared identifier is reported only once
test.c:6: error: for each function it appears in.)
test.c:6: error: expected ‘;’ before ‘a’
test.c:7: error: ‘QPushButton’ undeclared (first use in this function)
test.c:7: error: expected ‘;’ before ‘hellobtn’
test.c:8: error: ‘hellobtn’ undeclared (first use in this function)
test.c:9: error: ‘a’ undeclared (first use in this function)
test.c:4: warning: unused parameter ‘argc’
test.c:4: warning: unused parameter ‘argv’
make: *** [.obj/release-shared/test.o] Error 1

这个只是部分。


我的C文件如下
  1 #include <qapplication.h>
  2 #include <qpushbutton.h>
  3
  4 int main(int argc, char **argv)
  5 {
  6         QApplication a(argc, argv);
  7         QPushButton hellobtn("Hello QT",0);
  8         hellobtn.resize(100, 20);
  9         a.setMainWidget(&hellobtn);
10         hellobtn.show();
11         return a.exec();
12 }
我估计也是环境变量的问题。的开发板是micro2440.  
x86-qtopia正常安装。
级别: 新手上路
UID: 9740
精华: 0
发帖: 4
金钱: 35 两
威望: 16 点
贡献值: 0 点
综合积分: 8 分
注册时间: 2009-10-12
最后登录: 2011-09-29
24楼  发表于: 2009-11-05 22:20
不顶不行
wam
只要相信自己,就没有做不到的事!
级别: 侠客
UID: 6175
精华: 0
发帖: 52
金钱: 360 两
威望: 132 点
贡献值: 0 点
综合积分: 104 分
注册时间: 2009-05-22
最后登录: 2019-11-27
25楼  发表于: 2009-11-25 01:40
写的不错,学习了
天下事有难易乎!
级别: 新手上路
UID: 7253
精华: 0
发帖: 42
金钱: 330 两
威望: 188 点
贡献值: 0 点
综合积分: 84 分
注册时间: 2009-07-07
最后登录: 2012-07-09
26楼  发表于: 2009-12-08 20:28
好帖就要顶
飘然
级别: 新手上路
UID: 6231
精华: 0
发帖: 30
金钱: 190 两
威望: 82 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-05-24
最后登录: 2011-01-25
27楼  发表于: 2009-12-11 15:05
迟来的看贴 迟来的顶 顶一下啊!
用过的Linux发行版:Arch,Gentoo,Debian,Fedora,RHEL,CentOS,Ubuntu,OpenSUSE,RedFlag,Ylmf,De ..
级别: 骑士
UID: 12662
精华: 0
发帖: 181
金钱: 955 两
威望: 191 点
贡献值: 0 点
综合积分: 362 分
注册时间: 2010-01-11
最后登录: 2014-02-14
28楼  发表于: 2010-01-12 18:48
我发现楼主的确是高手啊!!!
业余Linux爱好者。
失败的原因只有一个,那就是半途而废!
级别: 侠客
UID: 12490
精华: 0
发帖: 56
金钱: 290 两
威望: 58 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-01-07
最后登录: 2015-09-28
29楼  发表于: 2010-01-13 01:46
好文章,多谢版主。
希望后续会出驱动硬件的文章。
呵呵给一个led的就好了,找到了方法,剩下的自己搞。
失败的原因只有一个,那就是半途而废!