Help - Search - Members - Calendar
Full Version: Porting Qt To Qtopia
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > Qt/Qtopia
Matthieu
Hi,
Is there anybody that has already do this ?
I'm looking for a tutorial and I don't find one.

thanks
Mickeyl
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.
Matthieu
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
zenyatta
There are limitations. 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.
Mickeyl
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)
Matthieu
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 ?
TimW
Use the fork, Luke!

...or popen etc.
Matthieu
I add a reopnse to a topic http://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.
lpotter
Sharps Qtopia and Qtopia in general does not use the multithreaded qt/e.
melee
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
melee
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
lpotter
QUOTE(melee @ Apr 19 2005, 07:57 PM)
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!
*


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.
smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.