Author Topic: Porting Qt To Qtopia  (Read 7977 times)

Matthieu

  • Newbie
  • *
  • Posts: 13
    • View Profile
Porting Qt To Qtopia
« 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

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Porting Qt To Qtopia
« Reply #1 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.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Matthieu

  • Newbie
  • *
  • Posts: 13
    • View Profile
Porting Qt To Qtopia
« Reply #2 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

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Porting Qt To Qtopia
« Reply #3 on: March 30, 2005, 05:27:03 pm »
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.
« Last Edit: March 30, 2005, 05:27:26 pm by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Porting Qt To Qtopia
« Reply #4 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)
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Matthieu

  • Newbie
  • *
  • Posts: 13
    • View Profile
Porting Qt To Qtopia
« Reply #5 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 ?

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Porting Qt To Qtopia
« Reply #6 on: March 31, 2005, 05:34:04 am »
SLC-860 cacko / senao wifi

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Porting Qt To Qtopia
« Reply #7 on: March 31, 2005, 07:32:25 am »
Use the fork, Luke!

...or popen etc.
« Last Edit: March 31, 2005, 07:32:48 am by TimW »

Matthieu

  • Newbie
  • *
  • Posts: 13
    • View Profile
Porting Qt To Qtopia
« Reply #8 on: March 31, 2005, 11:52:33 am »
I add a reopnse to a topic 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.

lpotter

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
    • http://qtopia.net
Porting Qt To Qtopia
« Reply #9 on: April 18, 2005, 12:04:22 am »
Sharps Qtopia and Qtopia in general does not use the multithreaded qt/e.
Software Engineer, Systems Group, MES, Trolltech
irc.freenode.net #qtopia
http://qtopia.net

melee

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Porting Qt To Qtopia
« Reply #10 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
« Last Edit: April 18, 2005, 03:39:57 pm by melee »
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

melee

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Porting Qt To Qtopia
« Reply #11 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
« Last Edit: April 19, 2005, 02:36:35 pm by melee »
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

lpotter

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
    • http://qtopia.net
Porting Qt To Qtopia
« Reply #12 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.
Software Engineer, Systems Group, MES, Trolltech
irc.freenode.net #qtopia
http://qtopia.net