OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Qtopia Programs On Other Systems?, And considering alternatives...
daniel3000
post May 29 2005, 11:42 PM
Post #1





Group: Members
Posts: 1,002
Joined: 28-April 05
From: Germany
Member No.: 7,027



If I develop a program for QTopia, what ways are there to run it on other machines than the Zaurus (i.e. on a Linux or Windows PC)?

Alternative would be to develop for X instead of QTopia, but I guess I'll have some problems on the Zaurus then.
Development of X/QT seems to have stalled in early 2004, so problems may occur at least if a new QT version is used.

I need to develop programs which are usable on as many systems as possible. If possible, I'd like to avoid development in Java.

Opinions?

thanks

daniel
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
jmbowman
post Jun 12 2005, 12:14 PM
Post #2





Group: Members
Posts: 22
Joined: 23-May 03
Member No.: 36



I posted the current code for my utility library here. My working name for it is qqutil (short for "Qt/Qtopia utilities"), and I'm using a "QQ" prefix for all the class names since it seems unlikely to clash with anything. I'll try to get back to work on this over the next few days, so if anybody finds any bugs or suggestions for improvement, please let me know.

Oh, and for clarification: it's not that it's particularly hard to get a program working across Qtopia and the desktop Qt versions. In fact, it's easier than just about any other way to try and get the same code to work on both a PDA and a desktop OS. This is virtually impossible with PalmOS, and pretty hard just across PocketPC and Windows (and code written for that particular combination won't run anywhere else). And the Java versions available for PDAs are so stripped down (and limited performance-wise) that it's tough to get anything substantial running on them. One of the main reasons I bought a Zaurus is because it's relatively easy to write code that runs on the PDA and multiple desktop OSes.

That said, there's still room for improvement. The scope of Qt doesn't include packaging, which is substantially different for each platform; utilities and documentation to make this easier could be quite useful. Some classes present in desktop Qt were omitted from Qt/Embedded on the Zaurus due to space considerations; programs meant to work across both platforms need to either avoid these or provide their own implementation for the Zaurus version. Qtopia uses a custom file management system designed to be more appropriate for a PDA, which means file management is a little different there than in desktop applications. Sharp wasn't quite happy with Qtopia's implementation of this and extended it with custom code of their own, which again needs to be handled a little differently. And finally, the Zaurus uses Qt 2, while desktop applications are typically written with Qt 3 (and soon Qt 4); unless you use Qt 2 for the desktop versions of your application (which foregoes many bugfixes and precludes an OS X version), some work needs to be done to cope with the API differences. Writing applications for future versions of Qtopia based on Qt 4 should be much easier, but for now this is something of an issue.

Hence, an application designed to run on all of these platforms ends up being necessarily cluttered with a moderate number of ifdefs in order to handle these special cases. It also requires a fair amount of knowledge of all these differences and how to work around them. It's a lot easier than writing and maintaining different versions of the code for each platform, but it's not ideal. So my goal with the qqutil library was to abstract away the most common problem cases by putting the ifdefs in a utility library, allowing applications to just use a single unified API as much as possible. Furthermore, I wrote a number of custom widgets for PortaBase that seemed particularly useful for a variety of applications (especially for ones running on a PDA with somewhat limited input capability and screen real estate), so I included those as well. It's all based on my experience with PortaBase, so it probably makes some assumptions that don't necessarily hold for all other applications; but it certainly seems like it'll save me from duplicating a lot of code for other applications I want to write.

To answer some of Daniel's questions: you have to use C++ for this, but C++ using Qt is much easier than without (from my perspective, it's really only worth coding in C++ if the Qt library is available). I've considered setting up a development environment on my Zaurus (and I know other people have had some success with this), but ultimately haven't done so; it's just a lot faster to work with a full-size keyboard and a faster processor. Some instructions on getting started with cross-compiling for the Zaurus are here; some of the information in the INSTALL file from PortaBase's source code tarball may prove useful for setting up development environments on other platforms also.

Anyway, time for me to start reading through the Qt 4 documentation in more detail so I can try to update qqutil to cope with that as well. Some of the new features look really nice, but they won't work in Qt 2 on the Zaurus, and I need to figure out how to deal with the changes in the container classes and list/tree widgets...
Go to the top of the page
 
+Quote Post
melee
post Jun 13 2005, 12:19 AM
Post #3





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(jmbowman @ Jun 12 2005, 09:14 PM)
I posted the current code for my utility library here
*


Hi,
Looks very promising, I'll try patching some of into an existing app to get familiar with it.
Thanks

Melee
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2014 - 03:21 AM