On Thu, 21 Aug 2003, Duncan wrote: > On Thu 21 Aug 2003 06:58, Maksim Orlovich posted as excerpted below: > > Where did you get this idea? > > I already said, basic background knowledge from the little widget programming > and conversion and documentation of such I've read.. then taking an educated > guess based on that and the known facts (the name, and the fact that several > folks commented that Qt-only apps worked better).
Well, a good start would be to see what the change actually did. All it involved was adding the shell script that exports QTDIR. Actually, I am a bit baffled by this, since nothing in KDE uses that when talking to Qt; QTDIR is mostly useful for things like qmake and uic (And it doesn't need to, as the code that i.e. does style application just writes *KDE* paths, from KStandardDirs into qtrc. How do I know that? I wrote that code). > > Of course, I also said I may know just enough to build up a plausible sounding > but fantastically wrong house of cards.. If that' is so, I'd appreciate you > explaining where I got it wrong, and what the right explanation is. However, > I'm generally pretty close, tho I've been wrong a couple times too. Well, you can't substitute KDE widgets for Qt widgets transparently. There is no such mechanism built into Qt, and in fact there *can't* be such a mechanism w/o an additional factory indirection that just isn't there. Think about it for a bit, particulalrly about how widgets are created in a Qt program. One would usually say something like this: QPushButton* pushButton = new QPushButton(parent); Now, what exactly does this mean, or rather, what's the code that will be produced by g++? Well, first of all, it'll call the operator new, giving it the size of the QPushButton object. Notice that this size may not be enough for a KPushButton. Then, the appropriate constructor is involved, calling QPushButton::QPushButton(args list here). Notice that this is all statically bound, modulo dynamic linking. So w/o playing any filthy tricks w/linker, what the code asks for is what it gets. Now, it's possible that people meant "KDE Widget styles" by "KDE Widgets" that's certainly there, thanks to Qt's plugin mechanism, but it has nothing to do with QTDIR.
