C++ GUI Programming with Qt 3
The first question that came to mind when I got this book - is there any need for it? Qt's Documentation is detailed and extensive with how-to's and an API reference available online for free. I have done GUI development in .NET (with C#) and Tk (with Perl) environments, and even though I've never tried Qt, the site with tutorials looked like a sufficiently good resource to start.
However, after getting through the first few chapters, religiously trying out the code, my opinions on whether a separate book is needed have changed. Jasmin Blanchette and Mark Summerfield's book can take a sufficiently clueless newbie with some C++ knowledge and guide him through the intricacies of GUI building, providing practical advice and some bits of experience on the way. You learn about the practicality of this book by turning to page 3 (with page 1 being the title) and seeing a code example as the second paragraph of the first chapter. Writing a basic GUI application in C++/Qt is attractively easy, to win you over and make you read the rest of the chapter, as well as finish the basic introduction by creating a windowed application with SpinBox and Slider widgets.
The table of contents is available on the publisher's Web site and looks fairly simple. Each chapter takes about 20-30 pages, with screenshots and code examples provided as part of the text. Reading the first 5 chapters, which comprise the "Basic Qt" section and take up 110 pages, should be enough for any C++ developer to build a sufficiently complex GUI application if all that's required is some graphical interface slapped on top of the functionality that's already there.
The rest of the book -- "Intermediate Qt" chapters -- take the reader into the common problems of GUI development, providing some insight into more advanced topics as well. Supporting networking, working with graphics and images, internationalization of the software application, interacting with help, reading XML through SAX and DOM APIs, accessing databases and doing inter-process communication are all covered here. The authors tended to avoid inserting huge amounts of reference material into the book, and, for example, in the XML chapter when working with Unicode you will be told to go online and download the numeric values of the Unicode characters instead of dedicating valuable book pages to it.
The language of the book is simple to follow; there are plenty of code examples (with discussion following each), and when the authors make certain choices, they also explain why. The diagrams and screenshots are clear (although not in color), and the code examples can be easily separated from the text. This is the first official TrollTech guide to Qt 3.2 programming, and the authors promise that the techniques will work with Qt 4.
Perhaps part of the positive impression that this book left is the fact that programming in Qt is easy and straightforward. At the early stages of my education, I started learning GUI programming with MFC, which left an indelible image of complexity and will probably increase psychiatrist bills in the future (to be fair to Microsoft, Windows Forms with .NET is a huge step forward). The book and the Qt library made some complex things sound quite simple and enjoyable to program. As Matthias Ettrich notes in the foreword to this book, the most important point in reasoning why Qt is so popular is "because programmers like it."
The book comes with a CD that contains non-commercial version of Qt 3.2 for Windows/Mac/Linux, Borland C++ 5.5 (Non-Commercial) and trial version of Borland C++ 6.0 compilers, SQLite database engine and book source code. The non-commercial version of Qt 3.2 for Windows can be installed for Borland C++ 5.5, Borland C++ 6.0, Microsoft Visual C++ 6 and Microsoft Visual C++.NET environments. The examples are quite conveniently located in folders with chapter numbers, followed by subfolders with example names.
Whether you're looking for general introduction to GUI development with C++ or trying to learn Qt, having worked with other libraries and toolkits before, this book is a good source of practical information and reference. The book is part of Perens' Open Source Series.
Alex Moskalyuk enjoys reading and reviewing books on programming and tech industry in general. You can read his other reviews on his personal site. You can purchase C++ GUI Programming with Qt 3from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
a non commercial version for windows? I thought there wasn't a non commercial version of qt for windows.
Java class files are fundamentally different because you actually can run them anywhere without recompiling.
C/C++ syntax has something going for it; it's very easy to program once you know the syntax. It is also very portable across different platforms. I assume that like many libraries, the functions can be called from a language other than C++, but isn't it cool that so much in the open source community uses a more or less common base language..
_________________________________
http://github.com/gbook/nidb
I got this book shipped to my door a few days ago.
I never ordered it. Had never heard of it. Not really interested in GUI programming.
Did the publishers just compile a list of people who know and talk about C++, and send them (us) free copies? Why? Do they hope we'll suddenly become interested enough to read a few hundred pages, because, hey, free book?
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
I personally like the wxWindows library. It's fully object oiented and handles all default behaviors for you. It has a very easy to use message handling system and the documentation is excellent (but should include a screenshot of each control for quicker reference). I once wrote apps is pure win32 API.. *puke* [this was before I really got interested in linux] I now refuse to use anything other than wxWindows.
Advantages of wxWindows:
Fully Cross Platform
Easy to learn API
Object Oriented model is well suited to GUI construction - 1 class = 1 screen object
You really should check it out - www.wxwindows.org
If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
[Speal about what it is/does]
Do you want to add a full fledged configure dialog to your Qt application by only writing one, twenty line function? If so than the KAutoConfig library is what you want. KAutoConfig is several classes that enables a developer to easily create a configure dialog for their applications. It automatically syncs GUI widgets values with values in the configuration file. It does this by looking for keys and widgets that have the same name. It obtains the default values from the initial values of the widgets. KAutoConfigDialog also manages all of the buttons in a normal configure dialog.
-Benjamin Meyer
Do you changes clothes while making the "chee-chee-cha-cha-choh" transformation sound?
Qt is probably the best C++ GUI toolkit out there. In my experience, developing an application is extremely easy and straightforward, due to the fact that the people at TT used the simple (yet effective) model of slots and signals. Writing a new event handler is as simple as overriding a method and then connecting it to your widget -- simple as that.
Not to mention the great I18N possibilities, the great XML-based Qt Designer application, etc, etc.
All in all, there are very few drawbacks to Qt, other than the commercial price -- but hey, if you're an open source developer, you get it for free. Otherwise, your employer will get his money's worth back -- simply due to the fact that Qt is such an excellent product.
(No, I don't work for TT -- I just enjoy their products very much)
Im sure plenty of people here know Java; any insights (especially from people who know more than one programming language)?
Manipulate the moderator system! Mod someone as "overrated" today.
Seems like it'd be a great resource for those wanting to cut their teeth on qt programming (myself). Of course that raises the question of how long the trail version of the compiler is valid for before either having to dish out some money or having the program deny you access instead of just reminding you "Hey, pay for me". Anyone have any information on the compiler at all?
SCO and Canopy combined own a bit over 5% of TT. Majority of the company is owned by the employees of TT. SCO/Canopy can in no shape or form control TT. And TT can't buy the shares back if SCO/Canopy is unwilling to sell.
So quit your whining.
Lesbian Nazi Hookers Abducted by UFOs and Forced Into Weight Loss Programs - -all next week on Town Talk.
Qt IMHO does not solve the more fundamental problems
of WORA. You need abstractions to basically the whole underlying OS, which is something the Java
class library provides.
And, as someone else pointed out already:
Qt is write once, compile anywhere.
Java class files can even be transmitted from
one OS to another in the middle of a remote call and are still able to run.
This is not to be intended as a rant. The thing that scares me about Qt is taking the time to learn it and then one day they decide not to offer a GPL version anymore. At least with GTK+ I know that it is 100% Open Source. I can write apps and even sell them without paying a royalty other than donating to support the cause.
the meta-object compiler
non-standard classes, e.g. string
The bad news is that the lack of standardization plays right into Redmond's game. "Keep them injuns fragmented, and we'll never get pushed into the ocean".
It hurts Open Source in general, and C++ in particular.
Qt is clearly a fantastic toolkit, if the success of KDE is any measure.
Now, if TrollTech had hair one, they would tidy up their free version (in terms of code and licensing) and submit it to Boost. Probably partitioned into a 'lite' version for cross-platform purposes, and a 'pro' version to keep the business model afloat.
Juat my $0.02
I'm a programmer, but not a GUI developer, so my knowledge of such things is limited. I've used Qt applications, and I've used GTK applications. Personally, I like GTK2, but that's mainly on an aesthetic level, rather than a functional or development level.
I ask anyone who's developed in either/both of GTK/Qt, and even those with Win32 experience. What advantages does Qt have over the other choices?
---
"Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of"-TMBG
Given Trolltech doesn't even have a website on archive.org prior to the year 2000 I find it a tad bit hard to believe that Sun was later in it's definition of write-once-run-anywhere.
Plus, if we're gonna play those games then I was using Motif on variety of platforms in the early/mid nineties with C without a need for re-write.
So I hardly think QT is a defining standard for write-one-run-anywhere GUI development.
Caution: Contents under pressure
I had the misfortune to read a book on Qt by Patrick Ward called Qt Programming. I'm sorry, but it's got to be one of the worst books on this topic that I've ever seen.
Stay far, far away from it.
Belief is the currency of delusion.
I've done substantive development using Wind River's Zinc application framework. Although not viable for personal commercial endeavors, I did port it to linux and found it to work quite well. It was just fluidly easy. I've become quite adept at windows programming also.
Does anyone have any comparitive info on WxWindows VS MFC or Zinc?
Will WxWindows work well within the Visual C++ (6.0) IDE?
Is the end result of WxWindows worth the effort of learning the implementation?
Thanks - Geccie
Why are so many GUI systems still closely coupled with specific languages? Why not divorce the GUI engine from languages? I don't know of any library that has successfuly done that. Although Tk comes close, it still requires a specific interpreter be installed.
Table-ized A.I.
However, the generic OS interfaces provided by the Java class library don't cover much more ground than what the POSIX-ish API subset provided by Windows covers. So you can already write relatively portable code in C++ that will run on both *nix and Windows.
At any rate, if you're willing to drink the Qt kool-aid, Qt itself provides a bunch of portable generic utility classes to address this same issue.
where is the Networking chapter?
Oh, I don't know there's a slight chance that Chapter 13. Networking might be remotely related to the topic you ask for?
With Java, there is a free as in beer VM for most platforms and as far as I understand, you can port Sun's code to your platform for free. You can also develop a clean-room VM and call it something other than Java.
With Qt, it's either an expensive license (my company requires a senior VP approval for any software over $150) or your program is GPLed and Linux-only. I guess a clean room port would be Ok though?
I chose Java UI + JNI over embedded Qt before for just these reasons. For C++ programming, I just hope OpenStep really takes off.
It's not the policy of my series to publish proprietary software on the accompanying CD. But there is some Borland stuff and a copy of Windows Qt on the CD. This is due to a mis-communication with my publisher. I found out about it very late in the process (as I was reading a galley proof), and decided to allow the deviation from policy this time rather than cause a tremendous hassle for Troll Tech. The book had already been advertised, and orders had been booked from stores, etc.
Thanks
Bruce
Bruce Perens.
And even though Java is WORA (sort of), it usefulness for end user UI apps is next to worthless. No Java based UI application of any complexity that I have used has been anything other than outlandishly sluggish. This ranges from the Java IDEs, to CASE tools, to various other editors, especially if they are based on Swing or AWT. IBM's SWT library is better (this is what Eclipse is written in), but even Eclipse is *still* sluggish when running with a mildly complex project.
Ah sorry, didnt see that, I hope it is indepth. My perl book isnt :/.
Encrypted IRC: SSH to port 20 on cat2.ath.cx and choose server 2
1) C++ (Because I can do everything in C)
That carries about as much weight as saying, "I don't care about women because I can do everything with my hand."
It goes from God, to Jerry, to me.
Well you know, if you really don't want the book, there's plenty of us poor college student programmers who'd be happy to take it off your hands...
Maxim: People cannot follow directions.
Increases in truth directly with the length of time spent explaining them
Yeah, because you never have to debug C or C++ programs...they're always perfect the first time around....
BTW, That's sarcasm
Never by hatred has hatred been appeased, only by kindness - the Buddha
"I don't care about women because I can do everything with my hand."
Damn right!
I can even talk with my hand while not wasting my time with a stupid woman.
With all due respect, I believe that C/C++ is more portable across more platforms than Java will ever be, not to mention it's more solid and efficient. This is further evidenced by more and more cross-platform libraries such as Qt. I recognize that a lot of new progammers jumped on the Java bandwagon because it was "the new thing" or was taught in college as a focal point of the compsi degree, but the truth is there aren't as many opportunities and possibilities with Java as C. Chances are as you're reading this, much of the software running on your machine was written in C/C++, and this language has always been relatively easy to port to other platforms -- it might not be the most elegant or user-friendly development environment, but it's still the way to go for serious applications.
Does anyone know how this compares with Programming with Qt from O'Reilly? That was the reccommended text for a Soft module I did last term/semester (whatever the uni chooses to call them this week). I thought it covered pretty much everything I needed..and even touched on the aforementioned XML/DOM/SAX stuff.
Karma Krazed K-Zealots bombing the opposition.
Well? Answer the question, what are Canopy
Reps doing on the board of directors of Trolltech?
Don't mod. Just answer the question.
Til then, I'm using WxWindows.
As LISP coders will tell you, if you're having to think about the "sin tax", it's not user-friendly. Move past that. Think about the semantics. Or as the Bene Gesserit would say,
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
1) C++ (Because I can do everything in C) :)
You can do everything in assembly too.
2) Qt
Then why read this article at all? I don't go to say, cheese-rolling.com and talk about how I'm not interested in rolling cheeses.
QT isn't C++. It is incompatible with the standard.
I was looking into using QT as a framework for a non-commercial project. I saw on their website that the only free Windows version available was so old that it wasn't really useful to me (too few features). Just now I checked their website I see no free Windows version at all.
the question remains, skip ahead
+5 Informative doesn't cut it.
Answer the question : What is Trolltech's relationship with SCO and Canopy. Why does
Ralph Yarro, Darl McBride's boss sit on the
board of directors of Trolltech? Does
Trolltech owe SCO/Canopy money? Does SCO
have the right to buy Trolltech later?
Does the money they take from SCO/Canopy give
SCO/Canopy certain rights? Like the right
to a seat on the board of directors?
Tart responses that get scored +5 just don't
cut it. Sorry.
Trolltech needs to come clean.
Modding down people who question this
isn't going to make the question go away.
Speak, Trolltech. Please.
Is it "cute" or "cutey" or what?
in girum imus nocte et consumimur igni
The main problem with Swing is that the resulting code is S L O W and bloated. I definitely notice the difference between Swing and SWT even on my P4 2GHz box with a half-gig of RAM.
Finding God in a Dog
Ok I only downloaded it 2 days ago. But it looks really good to me and doesn't have Qt restricitons. After buy both Borland C++ builder and VisC++ I now plan to use only Wx.
...basically you can distribute proprietary binaries without distributing any source code, and neither will wxWindows conflict with GPL code you may be using or developing with it. The conditions for using wxWindows 2 are the same whether you are a personal, academic or commercial developer."
Quote from the FAQ:
"
No reason to keep promoting a non-free project like Qt. http://www.wxwindows.org/ provides a free cross-platform, multi-language library...give it a try!
Speaking of portability, QT is a bit problematic, as they use non-standard C++ extensions to accomplish their purposes. (Something that the GTK C++ extensions purposely avoided.) Similar to what Microsoft has done with C++.
C++ has been my language of choice for the past 10 or so years, but it's sad to see the bastardization happening all over by these toolkits.
Perl and Python are WORA as well. They're often faster to develop in than Java, and have toolkits such as Qt and wxWindows. Personally, if I wanted a WORA application, I'd use Python/wxWindows to do it. It would be slower to run, but for most applications that doesn't so much matter.
If you want speed, then compile your software. Qt's GUI library is better than any for Java. No, really. I can't comprehend of anyone who has used both systems of prefering Java. Likewise, Python is a better language than Java is. I'd say this is all my opinion and whatnot, but, well, I can't believe that anyone that has used both Java and Python extensively could possibly think the former was better for client application development.
The only time you'd need Java for a desktop application, is if you need speed desperately, and you really, really don't want to have to compile it to get that speed.
QT is awesome. Its license isn't. Before you dismiss this as another ill-informed troll message, consider this:
I am involved with a university research project. We started developing our app using QT, but had to quickly abandon it due to the GPL issue. Due to complications with funding and grants, we can't currently open-source our project. And we will not be obtaining QT Developer's licenses for the following reasons:
1. The bureaucratic mess. A proposal would have to be written, alternatives examined, and so forth. This could take too long. This crap is the way many universities work...most software is given to us or obtained very cheaply with academic licenses.
2. Cost. $1550 goes a long ways in funding graduate students. Our research director would rather hire more students with the money saved. Even Microsoft Visual Studio, which includes far more than GUI widgets, is only a couple hundred bucks for the academic edition.
I think this is one example of why this is hurting the Linux movement. GTK is LGPL...QT should be the same. I know that TrollTech needs to pay their developers, but I sure wish someone like IBM would buy them out and LGPL QT. For something intregal to a platform, such as GUI toolkits, having to spend $1500 for a license to develop a close-source application just isn't good. Also consider small-time shareware developers. I know that shareware isn't popular in Linux, but its a way for a developer to get payed for creating that unique, niche application
Of course my arguments are based on my opinion that KDE/QT is superior to Gnome/GTK, and that if it weren't for the license issue, it would be the dominant platform today.
GNOME probably is further ahead in bindings for practically any major language and they are working hard to make it even easier to implement bindings to arbitrary languages.
Is it good, or is it whack? What is it all about?
Is it good or is it whack?
Windows Forms in .NET aren't coupled with any particular language. I'm guessing that wasn't the answer you were looking for, though.
Let's not stir that bag of worms...
Does a project with > 300 source files, using about 20 external libraries qualify as "mildly complex". Thats what i'm working on now and Eclipse is smoooth! This isn't state of the art hardware either, a dual p3 800mhz.
Qt has been released under a twin QPL/GPL license since 2.3. The people at TT made a version of Qt3 that's GPL'd for linux, and a QPL'd version for windows.
Just because the TT people didn't release GPL'd windows version doesn't mean you can't port the linux one over, and in fact, it's being done right now.
Jeez, they give us a great free library and everybody bitches. If you don't like TT's QPL'd Win32 Qt3, help port the GPL'd one over then.
TT's QPL version of Qt for windows will always be better/faster. Thats why you pay money. There will always be a GPL'd version though, and they can't take that back from us.
Now they can make a Qt4 that's not GPL'd at all, but then we'll have two standards. Which standard do you think will survive, the open one or the closed one?
Don't forget SDL (mostly for games, but still, it has bindings for just about every language with a compiler). And btw tk doesn't require "a specific interpreter" to be installed; the library has bindings for all sorts of languages.
Plus you can call the various Windows graphics toolkits from a host of languages, particularly once you consider .NET
All's true that is mistrusted
... don't forget about FOX, which is written in C++ but has bindings for other programming languages as well.
I don't go to say, cheese-rolling.com and talk about how I'm not interested in rolling cheeses. Arevos, you bastard! And here i was all ready to see some good 'ole cheese rolling, just to get a big fat "no such host" in my browser. Don't tease us like that!!!
This is so important. Some of the ... well, probably most of the C++ documentation is so complex that scares people off. Granted, the language is complex. But you can always present documentation in a friendly manner, with examples, and leave subtle points for a separate, advanced discussion. But I have the feeling that some C++ experts want to be part of an elite of a few enlightened people who know it. Too bad because it is a great language.
In this regard, Qt is a beautiful C++ toolkit, easy to use, really friendly, nicely integrated and documented. Not to mention the great RAD tools like QtDesigner ...
Yeah same here I have 3000 source files, run Intellij's Idea (Java Based IDE) on a 1Ghz/512MB athlon and it responds seemingly as fast as a native app. I also run Jboss, Oracle and listen to music in the background.
Are you intolerant of intolerant people?
but even Eclipse is *still* sluggish when running with a mildly complex project.
yeah, i hate that eclipse requires hardware from this century. modern software, modern hardware. what's that all about? SWT doesn't look or feel the same on linux (crap GTK) as it does on windows, but thats about the best they can do for now. Actually, if TT would go under and IBM could take a BSDish version of QT to use with this SWT, then it would be the same across platforms.
There was a Slashdot post a few months ago about Qt4 which stated that Qt4 was scheduled to be released in early 2004. Does the publication of this book indicate that the Qt4 release date has been pushed back? I hope not, because some of the proposed changes in Qt4 seem interesting, especially the introduction of model/view architecture for the table, list, and tree view widgets.
you whiney biatch.
How't that for a thorough explanation?
"Pay no attention to the man behind the curtain.
The great Oz has spoken! Go home !!!"
I believe that C/C++ is more portable across more platforms than Java will ever be, not to mention it's more solid and efficient.
That's not what the parent poster was claiming. He was comparing QT with Java. Does QT run on OS2 or Mac OS9?
I want to ask a very cloud-level question here between the WxWindows and QT toolsets. My thanks in advance for anyone that can attempt to answer this.
I my understanding is correct, a robust application developed with WxWindows would essentially just consist of the actual executable, because the controls used by the application (such as a tree view, list view, etc.) are native to each operating system. That is, in Windows, for example, the binary libraries that supply these controls are simply being wrapped in the WxWindows layer, meaning that WxWindows isn't supplying it's own library components that would have to be distributed with each application.
Qt, based on my very slim understanding, supplies its own binary libraries that would have to be redistributed with the application? Is that correct? Would a QT application compiled for Windows require the redistribution of the entire/partial QT libraries with the application?
Thanks to anyone who can answer this...
"It isn't necessary to completely suppress the news; it is sufficient to delay the news until it no longer matters." - N
The parent poster is absolutely correct.
The main advantage of Java over Qt is in the licensing. Sun does _not_ have a monopoly on Java (except on the name/trademark), whereas Trolltech _does_ have a monopoly on Qt.
If I am a commercial developer, and I want to program in Java, I don't have to go to Sun. The licensing of Java is such that anyone can write and distribute a Java VM. The only thing Sun retains the rights over is the Java name.
Thus, I can write my application in Java, and ignore Sun. I can instead use a JVM from IBM, Borland, HP, BEA, Novell, and so on. There are also Open Source Java implementations. In other words, I can use Java, and not pay any money to Sun, nor have any IP obligations to Sun.
But if I am a commercial developer, and I develop with Qt, then I must go to the one and only supplier of commercially-licensed Qt, which is Trolltech. My situation is much the same as it would be with Microsoft's Visual Studio. Because there is only one supplier of commercially-licensed Qt, I am stuck with that supplier. If Trolltech chooses to raise their prices in the future, then I will have to pay the higher price, or stop using Qt. If Trolltech decides that they will only support Xandros, for example, then I will be forced to either use Xandros, or stop using Qt.
Personally, I think that commercial developers who tie themselves to Qt are almost as foolish as the ones who tie themselves to Visual Studio. Has the Windows experience taught them nothing?
I would much rather use Java. It is widely supported, mature, and inexpensive (or even free) to use. Plus, according to job listings, Java is now tied with C/C++ as the most popular language used in business.
Of course my arguments are based on my opinion that KDE/QT is superior to Gnome/GTK, and that if it weren't for the license issue, it would be the dominant platform today.
I agree QT is superior to GTK, but ask yourself - if the licence is different wouldn't then QT be quite different too? Quite probably it wouldn't have the qualities to be a "dominant platform".
Like it or not, the revenue created from those licences are what has made QT what it is today. In fact, you might ask who's piggybacking who - is the OSS community piggybacking Trolltech, or is Trolltech piggybacking the OSS community?
The truth is somewhere in between, but I don't have a problem with that. The result is that we have a great toolkit licenced under the GPL licence, and under constant improvement as far as I can tell.
And quite frankly, if what you do a) needs to be redistributed and b) can't follow the GPL, then I don't have a problem with you paying. Research or not. If it's public research, well then make it public (GPL). If it's not, cough up the $$$.
Kjella
Live today, because you never know what tomorrow brings
AND HERES THE PROOF!
Canopy has absolutely no say in the running of Trolltech
You people keep proving my point: Trolltech
needs to come clean on exactly what their
relationship is with Canopy, Ralph Yarro
and SCO.
The scary part is this : Canopy and SCO may
have warrants on Trolltech ( that is the ability
to buy Trolltech at a later date).
That is how outsiders can take control of a
company.
Trolltech could clean it all up by spelling out
exactly what their relationship is with Canopy.
They could also say "We fully support free
and open Linux and we feel that Canopy and SCO,
who are part owners of us, are wrong. We
hereby part ways with Canopy and urge all
stockholders to vote with management to replace
Ralph Yarro with someone else".
It's so simple to that it is *scary* that
they haven't done it aleady.
I can't seem to find it on the download site. Is that just some "special edition" with the book, neither commerical nor publicly available?
Kjella
Live today, because you never know what tomorrow brings
Last time I looked at the Java API it contained
VASTLY more thatn the POSIX-API.
Just go check for yourself and be amazed.
Sure it contains a lot of stuff, but the issue at hand was OS abstraction APIs. That's only a small fraction of the libraries.
You do not have to GPL your code with Qt.
You can always port the GPL Qt to another platform, such as Windows. (No harder than porting Sun's code to your platform for free.)
And if its portability would be so great, why did complete, standards-compliant compilers only get available recently? Why do many projects choose not to use exceptions or even templates to avoid portability problems?
Language standards evolve and it takes time for compilers to become compliant. Even ANSI C has seen some changes over the past few years -- and I guarantee to you that compilers didn't implement the new changes instantly. They don't evolve C++ to piss you off, they evolve C++ so that the language can serve you better. Forgive them if some of the new language features are hard to implement... hey, no one ever said building a compiler was easy.
ISO C++ does have a larger grammar than ANSI C, but the features the syntax introduced by C++ aren't gratuitous. Read The Design and Evolution of C++ by Stroustrup and you'll understand the whys and musts of C++.
As for why aren't templates and exceptions used in all projects... Well, there are good fundamental reasons why projects might choose to not use templates or exceptions or both, and they have little to do with portability.
For example, while templates are fast and type safe, they also might explode the size of your code. So if small is what you need, you may find that using void * containers is cheaper than using templates.
As for exceptions, it's understood that exceptions are slower than more traditional methods of checking status return codes. Some projects may need a better guarantee of performance than what exceptions might introduce to their runtime.
C++ is all about making features affordable and at the same time giving you choices. If the language looks ugly, it's only because some non-trivial amount of ANSI C compatibility has always been highly desireable. C++ remains a practical choice for developing highly scalable, highly reliable software.
wxWindows is, granted, easy to learn and has a OO model for widgets.
It's definitely not cross-platform, though. I'd say roughly 50% of its features work correctly (and similarly!) on both platforms -- I mean, GTK+ and Win32.
The Mac port is a horrible bunch of undocumented, buggy, incomplete crap. It even manages to be ugly (well, Qt also is ugly under MacOS).
Why don't people use Tk ? It's cross-platform too, and like Java, Tcl runs everywhere without recompiling. It doesn't even need to be compiled once!
Is it just because it's older (therefore less hip) than Qt and wxWindows ?
I'd love to see an ELF binary transmit from Linux to Windows in the middle of a remote call and then run on Windows...
Karma: It's all a bunch of tree-huggin' hippy crap!
"That carries about as much weight as saying, "I don't care about women because I can do everything with my hand.""
Hey, my hand doesn't bitch at me about commitment and whatnot. It doesn't care if the place gets a tad untidy. And it doesn't think that being on the computer at 4 am is some sort of seriously abnormal behaviour. I have never felt an impulse to chop it off or suggest that we need to spend some time apart.
Java is far superior in almost every way.
Documentation--Java is amazingly superior. Go look at the manuals and references in Qt Designer, or on the TrollTech website. Examples suck, in the reference even the trivial classes have dozens of rarely used methods, and none of it is alphabetically indexed. Compare that to the Java 1.4.2 SDK--wonderful docs, examples and tutorials.
Classes--Java (or STL) wins hands down. Qt is bastardized C++. There are duplicate classes for most of the STL, and they are named "QtWhatever". Tiresome and repetitive. They should back off and wrap only the GUI and use STL args to the GUI wrappers.
GUI builder--Qt Designer tends to crash whilst moving children from container to container. The integration between Qt and KDevelop is nasty, and requires some research to get it all working. The naming conventions between properties and the methods used to access them suck! There is almost no correlation...you have to scan the reference for ages to find anything...unlike in java...take a look at netbeans.org to see something that works.
Kdevelop--this, and Qt are supposed to be pretty cool. And, from a hacking point of view, they are. Except the debugger often doesn't work and you have to fall back on DDD to actually find out where the problems are happening. Kdevelop often ignores breakpoints or locates the wrong part of the code when there is a problem. DDD seems to be correct, from what I've seen.
So although I use both Java and KDE/Qt, and I have to continue using both, I think TrollTech and the KDE people are riding a wave of popularity that is in their heads. It needs a lot of work to be viable.
Sun and Java? Will it remain free? I don't know. The licensing is much, much better for people who are paid to program and want to write some throw away code, or a quicky project. The TrollTech licensing could leave you with big problems from the instant you launch Qt Designer (and are paid to use it, even as an ISV) even if just for a minute.
Think about how much that sucks. I'm an ISV, and I have no intention of buying a TrollTech license, I just don't make enough to afford $1550 a year. The one time I tried to get a customer to pony up for it, they laughed at the price. They want C++, they like KDE and Qt, but they think the licensing and price are absurd and I agree. Am still trying to get them to use Java. These are just small internal apps, nothing for sale, nothing anyone outside our industry would care to use.
SCO at one time was a friend of Linux, they were a big community supporter, etc...but the CEO or ownership or whatnot changed. Then they became they antichrist.
If TrollTech does the same thing, think about the legal consequences. It's nightmarish...people installing it have no idea they are responsible to either pay or release their code under the GPL. No warning whatsoever.
And reading the Qt license it says "commercial use" a lot. A lawyer would have fun with that term I think. When a secretary launches OpenOffice on a machine with the Qt libraries installed, is that commerical use? She's developing docs, getting paid to do it. This is not as wild a claim as SCO is making, in my opinion...and IBM and Oracle are switching to Linux...you figure it out.
Even just writing a throw away test project, for a couple of weeks, could leave your company open to lawsuits from TrollTech. That's the way they wrote the license, and it's what lawyers do to make money.
At least with Sun, Microsoft and Borland, things are a lot clearer, no wondering who will someday own the company, etc.--or start looking for people to sue.
Anybody that still thinks "free as in beer" cliche is worthy of use needs to answer this question: Do you know ANYTHING?
real geeks hate soap operas.
I have never felt an impulse to chop it off or suggest that we need to spend some time apart.
It's especially tough when your hand is the one asking for time apart.
It goes from God, to Jerry, to me.
Lisp, Perl and Python have closures. Java has anonymous classes. C# has delegates. C++ doesn't have any compact, elegant, nonproblematic way to represent callbacks.
That makes C++ seriously handicapped for any event-based programming. C++ could remedy the situation by adopting delegates from C#.
I'm suffering from an evil in computer programming: GUI-less instruction from colleges. When they teach you programming in computer science, it is only theoretical material of little value in the job market (most CS majors never do programming because they can't do GUIs)
Little time goes into teaching you beyond OO in your intro classes. You end up capable of coding, but writing lots of buggy code on your own and without any robust IDE or even syntax coloring. I was thought CLI C++ instead of even the simplest GUI's because there is no FREE standard that colleges follow. Moreover, we had Unix systems and our code only ran on SGI's Glut / Mesa, which is falling into obsolesence year after year, and hard to port to Windows, which is where most real-world code will run.
I am currently trying to learn GUIs with Borland and certain common Windows IDE's because Linux and Unix seem to rescind the need in for GUI experience in the job market right now --only SHELL scripting is needed. Check out craigslist.com and look on employment for DBA's and Programming... Ironically, if we can't learn GUI's in college, when on earth can we get started? The uselessness of command-line college projects is what makes so many of my colleages hate Programming even though it's nearly the only non-academic application of the entire career ( helpdesk DOESNT count... it's IT, not CS.) Imagine if we could all implement those little projects we have in our heads without learning the hard WIN32 API or all of your non-standard GUI toolkits. THAT, my friends, is why {GW|Q}BASIC will never die in my heart. Too bad it got turned into a weird, DLL-using language.
Qt Book Edition Non-Commercial License Agreement North andSouth AmericaAgreement version 1.1
IMPORTANT-READ CAREFULLY:
1. This Trolltech End-User License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) ("Licensee") and Trolltech Inc ("Trolltech"), and pertains to the Trolltech software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software").
2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as by other intellectual property laws and treaties. The Licensed Software is licensed, not sold.
3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee should not install, copy, or otherwise use the Licensed Software.
4. Upon Licensee's acceptance of the terms and conditions of this Agreement, Trolltech grants Licensee the right to use the Licensed Software in the manner provided below.
5. Trolltech grants to Licensee as an individual a personal, nonexclusive, non-transferable license to make and use copies of the Licensed Software. Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software.
6. Licensee may not modify or distribute the Licensed Software. Licensee may not loan, rent, lease, or license the Licensed Software or any copy of it. Licensee may not alter or remove any details of ownership, copyright, trademark or other property right connected with the Licensed Software.
7. Licensee may use the Licensed Software to compile, link and run software legally developed by Licensee or others. If any software, e.g a scripting wrapper, gives Licensee direct or indirect access to functionality of the Licensed Software, usage of the software is considered to be usage of the Licensed Software and is thus bound by this Agreement.
GENERAL TERMS THAT APPLY TO APPLICATIONS AND REDISTRIBUTABLES
8. Licensee is as an individual granted a personal, non-exclusive, non-transferable license, in a non-commercial setting, to develop application programs, reusable components and other software items that link with or in any other way require certain parts of the Licensed Software ("Redistributables") as specified in Appendix 1 ("Applications"). A non-commercial setting means that the Licensed Software may not be used in the course of Licensee's employment or whilst engaged in activities that will be compensated.
9. (i) Applications must add primary and substantial functionality to the Licensed Software; (ii) Applications may not pass on functionality which in any way makes it possible for others to create software with the Licensed Software; (iii) Applications may not compete with the Licensed Software; and (iv) Licensee may not use Trolltech's or any of its suppliers' names, logos, or trademarks to market the Application(s), except to state that the Application was developed using the Licensed Software.
10. Distribution of the Applications are subject to the following requirements: (i) The Application(s) must be distributed for free and/or be freely downloadable; (ii)The Application(s) must be licensed under a license which is compliant with the Open Source Definition version 1.9 as published by the Open Source Initiative (please refer to http://www.opensource.org/docs/definition.php); and (iii) Licensee must explicitly license all recipients of the Applications to use and re-distribute original and modified versions of the Applications in
VC++ 6.0 or VC++ .Net?
Caldera and/or Canopy invested some money to TT years ago. There was no indication back then that they were about to turn evil.
Because they are one of TT shareholders (although minority shareholders).
Not to my knowledge. What makes you think they owe them money?
Again: what makes you think that? Why would SCO have the right to buy TT, and not Borland for example? You are not making any sense.
They don't take any money from SCO/Canopy. SCO/Canopy/Caldera invested in TT years ago, that was when they got money from them. What did SCO get in return? A bit over 5% of TT shares. And those shares give them the seat at the board of directors. But that does NOT in any shape or form mean that they are controlled by SCO! Hell, about 94% of TT is NOT owned by SCO/Canopy, but yet, according to your logic, TT is somehow magically controlled by a company that owns a bit over 5% of the company. TT employees (who own over half of the company) are not in fact control. Also, companies like Orkla and Borland are just puppets of SCO!
Have you adjusted your tin-foil hat recently? It seems that it's not working!
Lesbian Nazi Hookers Abducted by UFOs and Forced Into Weight Loss Programs - -all next week on Town Talk.
Well, that's because Java class files are interpreted and not compiled. And no, bytecode is not compiled either, it's still interpreted.
Sorry :(
Here
In fact, I was just claiming that Ruby is obviously better than Python, as a language. I fail to see your point. :-)
Karma: It's all a bunch of tree-huggin' hippy crap!
Technically, I would presume William Gates is an employee of Microsoft in his executive role.
Donte Alistair Anderson Roberts - hi son!
Karma: Chameleon
Without having used Ruby, I couldn't comment :P
I have used Java. I have used Python. Python's clearly the better language out of those two. You seem to have dragged Ruby into it; for what reason, I have no idea. I take it you're a Ruby fan?
Not really. I was just pointing out something about Python fans who seem to think it's the only "truly" OO scripting language on the planet. ;-) Of course Python wasn't mentioned in the article either so we're both off-topic, aren't we? :-)
Karma: It's all a bunch of tree-huggin' hippy crap!
Actually you can style GTK to look like Qt. One way is just to get matching styles for each one natively (examples are Bluecurve and Keramik/Geramik), or there is a project working on a GTK style which draws using the current Qt style. So on Linux, SWT will look fine.
However...
By default, on Windows, SWT looks like arse. There's a manifest file you can drop into Windows\System32 to fix this, but if Eclipse shipped in a smarter fashion this wouldn't actually be required. :-)
Karma: It's all a bunch of tree-huggin' hippy crap!
Oh, who cares at this point? :) - The first language that comes to my mind when someone says "truly OO scripting language", isn't Python, or Ruby, but Smalltalk ;)
Ruby I haven't looked at much. Does it have a compiler and access to a good GUI toolkit, like Qt or wxWindows?
interesting, i'll have to do some searching on this manifest file for windows and see how it changes eclipse appearance.
from my usage, eclipse looks fine on windows, but like total crap on linux (gtk2). maybe it's the style i have setup for gtk2, but the widgets being used are too big and waste too much space outside of the actual code and stuff i'm interested in viewing.
There is definitely wxRuby. I'm not sure about Qt but I did hear something about a binding being developed.
Karma: It's all a bunch of tree-huggin' hippy crap!
Looking at it, Ruby's uses an interpretter. There's nothing like Py2exe that I can find that would generate executables. Ruby would be fine for server-side stuff, but not for client apps.
Plenty of people use interpreted Python for client-side apps. I guess that's because performance isn't as important on the client. If it were, you might see a lot more Java on the client-side. ;-)
Karma: It's all a bunch of tree-huggin' hippy crap!
Yep, but if I were designing client software to be used on an average Windows user's machine, I'd probably want it to be a compiled executable, that would run right out of the box.
I'm really not interested in any company, technology, or development group that's within a couple hops away from SCO.
Ever heard of "six degrees of separation"? Yup, that means Linus Torvalds is within a half dozen hops away from Saddam Hussein and Osama Bin Laden. I sure hope you don't use Linux.