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...