I Don't Like Qt.

Journal started Dec 15, 2003


Why I Don't Like Qt.

I do like Qt, that is, I wish I did. It is a well thought out programming library, written in C++, that would have been a pleasure to write GUIs in. The only trouble, aside from its creator's dubious licensing finagles, is in the installation. I download Qt, ok? (It's huge.) Unpack it in a source directory, configure to the specifications I want, and install.

It fails unconditionally.

In fact, it should fail on almost anyone's computer, no matter how POSIX complient that computer is. The trouble is in the build tools. Qt have a number of very ingenious build tools, uic, qmake, that sort of thing. They ease the process of generating a user interface, causing less redundant code being generated manually. The only problem? They link to the Qt libraries.

It's a little known fact that it's almost impossible to specify which libqt-mt.so your program will link to when specifying -lqt-mt on the command line. Though it is possible to do this, the makers of Qt... don't. So as a result, they will build the new libraries in a subdirectory, build the build tools (uic, qmake, etc.) in another place, but link the build tools to the old Qt library you already have installed. You can imagine what a pleasure it is to have the tool necessary to build the rest of the Qt distribution suffer a run-time link error, only showing up when the build process tries to use the program, an error that says "Symbol not defined" because they said -L /blah/blah/Qt-3.2.44/src/lib -lqt-mt instead of /blah/blah/Qt-3.2.44/src/lib/libqt-mt.so. They look like they ought to do the same thing, but the equally brilliant gcc team decided that they were going to hardcode the paths that -l searches, only falling back to the -L paths if qt-mt isn't found in /usr/lib /usr/local/lib, etc....

The solution proposed by Trolltech? Delete your old Qt. Now I might be out of my element here, but I use Qt. I wouldn't be building a new Qt unless I was already finding use of it. So deleting Qt from my system would be fine and dandy, except my entire graphical user interface would be suddenly crippled, probably crash horribly. Even if I removed the old libraries and did the build process in text mode, who's to say something else wouldn't go wrong? I might end up with a shiny new copy of Qt that won't compile, and a deleted copy of the old Qt. And don't think I can just reinstall the package because you Do Not apt-get remove the Qt packages, unless you also want to erase every single graphical package on your hard drive.

I could sequester libqt-mt.so, libqt-mt.so.1, libqt-mt.so.1.etc off somewhere gcc can't find them, and then copy them back after installing the new Qt in /opt. That might work, except I'd still have to do it all in text mode, and Qt takes hours and hours to compile, if not all day. So an entire day in the unproductive and hard to use text mode is something I'd rather not deal with just because Trolltech couldn't figure out that maybe people might be trying to compile a new Qt while using their old one.

Bottom line: use Gtk. It's uglier, it's C, but it won't unconditionally fail during its build process due to you not deleting an essential library to your computer's function at its creator's advice. Try to avoid Gnome: I have yet to see it even come close to surpassing KDE in user interface, but Gtk should work for either windowing system.


Comment
Index
Previous (Hello Employers, Thermodynamics?)
Next (I Made Someone Happy... So?)

(cc) some rights reserved