OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: Matthieu on March 30, 2005, 03:57:17 am

Title: Porting Qt To Qtopia
Post by: Matthieu on March 30, 2005, 03:57:17 am
Hi,
Is there anybody that has already do this ?
I'm looking for a tutorial and I don't find one.

thanks
Title: Porting Qt To Qtopia
Post by: Mickeyl on March 30, 2005, 04:21:12 am
Could you rephrase your question? Qtopia is based on Qt/Embedded, that's why in the present state your question doesn't make much sense.
Title: Porting Qt To Qtopia
Post by: Matthieu on March 30, 2005, 05:49:00 am
I develop software with the current version of Qt/X11 and I want to change to Qt/Embedded.
On troltech site they say that's easy.... hum I wanna know how
Title: Porting Qt To Qtopia
Post by: zenyatta on March 30, 2005, 05:27:03 pm
There are limitations (http://doc.trolltech.com/qtopia1.6/html/overview.html#3). Most notably, the Open/Save dialogs are missing, as well as the QSlider widget. You have to re-implement these things or forget about features that use them. As for QSlider, I seem to remember there was a link to an implementation at the Sharp developer website (is the site still alive?).

z.
Title: Porting Qt To Qtopia
Post by: Mickeyl on March 31, 2005, 05:09:35 am
1.) You need to inherit your application object from QPEApplication() instead of QApplication().

2.) You must not use classes and features which are not in the particular build of Qt 2.3 Embedded (see qconfig-qpe.conf in Qtopia sourcecode for a list of disabled features)
Title: Porting Qt To Qtopia
Post by: Matthieu on March 31, 2005, 05:24:55 am
Hi,

I've got a problem because I use a qprocess in my application and I dont' see an equivament in qt 2.3.

do you know one ?
Title: Porting Qt To Qtopia
Post by: pgas on March 31, 2005, 05:34:04 am
It seems that there is something here:
http://doc.trolltech.com/qtopia1.7/html/qtopiaemb.html (http://doc.trolltech.com/qtopia1.7/html/qtopiaemb.html)

http://doc.trolltech.com/qtopia1.7/html/qprocess.html (http://doc.trolltech.com/qtopia1.7/html/qprocess.html)
Title: Porting Qt To Qtopia
Post by: TimW on March 31, 2005, 07:32:25 am
Use the fork, Luke!

...or popen etc.
Title: Porting Qt To Qtopia
Post by: Matthieu on March 31, 2005, 11:52:33 am
I add a reopnse to a topic https://www.oesf.org/forums/index.php?showtopic=431 (https://www.oesf.org/forums/index.php?showtopic=431).
I'm changing my code to Qtopia, and during the compilation I've got this error.

pc3c15:/v3# make
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o main.o main.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o compass.o compass.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o map.o map.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o MyThread.o MyThread.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o process.o process.cpp
/opt/Qtopia/sharp/bin/moc compass.h -o moc_compass.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_compass.o moc_compass.cpp
/opt/Qtopia/sharp/bin/moc map.h -o moc_map.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_map.o moc_map.cpp
/opt/Qtopia/sharp/bin/moc process.h -o moc_process.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_process.o moc_process.cpp
arm-linux-gcc  -o gpus main.o compass.o map.o MyThread.o process.o moc_compass.o moc_map.o moc_process.o  -L/opt/Qtopia/sharp/lib -ljpeg -luuid -lqte-mt -lpthread
/opt/Embedix/tools/arm-linux/bin/ld: cannot find -lqte-mt
collect2: ld returned 1 exit status
make: *** [gpus] Erreur 1
pc3c15:/v3#

thanks a lot.
Title: Porting Qt To Qtopia
Post by: lpotter on April 18, 2005, 12:04:22 am
Sharps Qtopia and Qtopia in general does not use the multithreaded qt/e.
Title: Porting Qt To Qtopia
Post by: melee on April 18, 2005, 02:45:04 pm
Quote
arm-linux-gcc  -o gpus main.o compass.o map.o MyThread.o process.o moc_compass.o moc_map.o moc_process.o  -L/opt/Qtopia/sharp/lib -ljpeg -luuid -lqte-mt -lpthread
/opt/Embedix/tools/arm-linux/bin/ld: cannot find -lqte-mt
collect2: ld returned 1 exit status
make: *** [gpus] Erreur 1
pc3c15:/v3#

Hi,

The reason it fails is you are trying to link against the wrong libraries

The most common reason is that you haven't set up the environment for compiling qte / qpe and you are still using the default tmake template which is for a linux-g++ application build.

You obviously have the Embedix package, there are scripts in there to change all the env variables required and launch a new bash shell suitable for compiling.

Just remember to do a make clean then delete the Makefile and create a new one from within that env with tmake -o Makefile ./<projectname>.pro

Then you will get a Makefile which looks in the right place for header files and links against the right libraries etc

I had no end of fun until I got a that straight in my head

regards

Melee
Title: Porting Qt To Qtopia
Post by: melee on April 19, 2005, 05:57:38 am
Further to above:-

When you do create a new Makefile and try and compile, the chances are unless you have ported your code completely, that you won't ever get to the linking stage.  It will throw up shed loads of errors that at first sight may seem bizarre.

The reasons for some of them are mentioned above and elsewhere in the forum;  dont use  QApplication, no static members exist in QFileDialog for getOpenFileName() etc, message boxes best dealt with via QPEMessageBox if in qpe etc etc

I have not tried porting one of my existing apps to QPE or QTE simply because they are system specific to big-box Linux.  Can't really see the need for a CD/DVD writing app on the Z for instance!

What I did do, was make a skeleton MDI app under KDevelop and then try porting it to the Z, at which point I became aware of the above issues and found I could get compilation if I made changes like re-implementing the File->Open mechanism etc

You may wish to start with something like that rather than than a more complex app.

There are some pointers to documentation on porting issues elsewhere in the forum, search on porting should bring them up

Have fun

Melee
Title: Porting Qt To Qtopia
Post by: lpotter on July 13, 2005, 01:51:47 am
Quote
I have not tried porting one of my existing apps to QPE or QTE simply because they are system specific to big-box Linux.  Can't really see the need for a CD/DVD writing app on the Z for instance!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=75887\"][{POST_SNAPBACK}][/a][/div]

Perhaps not on a Zaurus, but quite possibly for Qtopia device. Ya never know what might be around the corner!! Qtopia can also be put on settop boxes.