The Independent Qt Tutorial has been updated with a completely rewritten chapter about the Qt object model. It provides lots of examples and in-depth information.
The Independent Qt Tutorial has been updated with a completely rewritten chapter about the Qt object model. It provides lots of examples and in-depth information.
http://doc.trolltech.com/3.2/templates.html
Good overview of the rationale behind the Moc precompiler.
Just struggling with one of the limitation: moc allows multiple inheritance only one class being inherited from QObject. And I guess there’s no hope that this will change in Qt 4. 🙁
Have you encountered this as a problem in an actual programming situation? Multiply-inheriting from QObject sounds like a classic case of poorly conceived uses of multiple inheritence. The reason is that QObject-derived classes tend to be “heavyweight” classes, while usually the acceptable uses of multiple inheritence involve “lightweight” (mixins, interfaces) classes.
Now the real reason that QT probably doesn’t allow MI with more than one instance of QObject is because of C++’s very poorly-conceived multiple inheritence model. The default behavior for diamond shaped graphs (two copies) is absolutely inane. The lack of linearization is a burden on the programmer, as is the lack of a “super” keyword. This is actually just another example of *why* Moc is a good idea, and why C++ by itself is not very well-suited to object-oriented GUI code.
qt will never compete with wxwidgets until they make a non-commercial windows license.
It does already compete and successfully.
> qt will never compete with wxwidgets until they make a non-commercial windows license.
1. Qt already has a non-commercial windows license
2. As far as I know, Qt is already a lot more popular than wxWidgets, probably due to it’s commercial support.
“1. Qt already has a non-commercial windows license ”
Tell me where I can download it on the trolltech site, and I would be using it right away
There is no non commercial windows license since a long time.
There is one, actually, but can only be used if you don’t write commercial and/or proprietary software with it.
Look at http://www.digitalfanatics.org/projects/qt_tutorial/chapter03.html for links, follow the link titled “GPLed Qt for win32” (it leads here http://kde-cygwin.sourceforge.net/qt3-win32/ .
There is no non commercial windows license since a long time.
So what?
“So what?”
So it is not possible to develop softwares without paying a license to QT, which is disapointing, since I’d like to code a open source projet with QT on windows and linux…
So, how ’bout that tutorial! Yeah, I didn’t RTFA either.
There is one, actually, but can only be used if you don’t write commercial and/or proprietary software with it.
I guess that’s why it is called non-commercial licence
For those who are interested, it comes on the CD of tne book “C++ GUI Programming with Qt 3” (Prentice Hall), which also includes a Borland compiler for Windows and the Qt/Free versions for X11 and MacOSX
“So it is not possible to develop softwares without paying a license to QT, which is disapointing, since I’d like to code a open source projet with QT on windows and linux…”
if you got real code then I am pretty sure it can be release as open source in both windows and linux
I think that one of the problems here is that the Trolls like most of us have the terms “commercial” and “proprietary” mixed up. Everyone keeps forgetting that under the GPL only the SOURCE CODE of an app has to be “beer free” (usually distributed with the binary of the app) and that there is a SPACIFIC CLAUSE in the GPL that allows for distribution fees for binary versions of software covered under it as well as other for fee services. Such a distribution fee for binaries distributed by CD or a restricted access web site is essentially selling the binary version of the software and hence COMMERCIAL.
In fact there is only ONE commercial activity that the GPL spacifically forbids. That is selling SINGLE SEAT LICENSES for the binary software made with code released under it.
Personally I’m beginning to like the challenge of being the first “shareware” producer to go all GPL “donationware” instead and prove that people CAN MAKE MONEY from this license when they KNOW what it actually says. ;c)
(personally I find the whole idea of Single Seat Licensing
to be basically dishonest even for proprietary close source stuff anyway.)
This is why I think that there is NO Windows version of QT that allows GPLed software. The Trolls wisely want to keep
CROSS PLATFORM commercial development, even that suggested by the GPL as a PAY service of theirs.
“if you got real code then I am pretty sure it can be release as open source in both windows and linux”
You fail to see the problem: it of course would be released open source on both plateforms. But presently, it is NOT possible, because there is NO free (as in you don’t have to pay anything to trolltech, no as in freedom) version of QT on windows. Check the site of trolltech: the only win version you can download are an evaluation (30 days) and the commercial one (for which you have to pay, of course).
It is nice to see that the since long resolved licensing issue still is high on the Qt discussions top-ten. If you plan to deploy code for win32, you plan to deploy code to someone who allready has put money into software and uses a non-free environment. If you still want to do that, buy the book and publish your code or use the GPLed fork. As for the rest, I do not see the problem with Qt making money from a great product. BTW, does anyone have a link to his/hers open source project that he/she wants to release on win32?
As the author of the tutorial mentioned in the news item I’m curious about how you feel about the tutorial, not the licenses. Is there anyone feeling like discussing it?
“You fail to see the problem: it of course would be released open source on both plateforms. But presently, it is NOT possible, because there is NO free (as in you don’t have to pay anything to trolltech”
you can. qt has been ported from the x11 version. google for it. you are either uninformed or need to develop some code and talk to the guys involved
”
you can. qt has been ported from the x11 version. google for it. you are either uninformed or need to develop some code and talk to the guys involved”
It fails to even compile each time I tried it (at least 4 times), with a weird segmentation fault from make.
I’d like to use qt because it is a complete, well developped framework. The GPL win32 version is not really mature, as far as I know.
“As for the rest, I do not see the problem with Qt making money from a great product”
Me neither. I develop for hobby, not for any commercial product. I can happily use qt without restriction on linux and mac OS X, not in windows. When you want to develop cross plateform products, it is a bit disapointing.
“If you plan to deploy code for win32, you plan to deploy code to someone who already has put money into software and uses a non-free environment.”
You can say the same for mac OS X. Nevertheless, there is a GPL version of qt for mac os X.
“You can say the same for mac OS X. Nevertheless, there is a GPL version of qt for mac os X”
Yes, and there is an X server freely available for OS X so there is no point in not GPL-ing the OS X version.
any alternative to Qt…with free license?
“Yes, and there is an X server freely available for OS X so there is no point in not GPL-ing the OS X version.”
I don’t see the link with X. I am talking about the native OS X implementation of qt, of course, not the X11 version (there is also a X11 version for windows on cygwin, I think).
“I don’t see the link with X. I am talking about the native OS X implementation of qt, of course, not the X11 version (there is also a X11 version for windows on cygwin, I think).”
The X server for OS X is freely available from Apple, i.e. it is official, and it integrates seamlessly.
If you thing cygwin is an alternative, why not use the X11 version + cygwin for windows?