The recent book C++ GUI Programming with Qt 3 contains complete distributions of a relatively-current (3.2.1) version of Qt for Linux, Mac and Windows. Installing Qt on Windows wasn’t easy, though–certainly not as easy as one would expect. I ran into a number of little quirks that took a surprisingly long time to resolve. These issues aren’t Trolltech’s fault, just little gotchas to be aware of–but they are frustrating if you don’t know how to deal with them.
If they’re not Trolltech’s fault, then who IS at fault? Santa Claus? The Tooth Fairy? Inquiring minds want to know!
Though installation quirks may be blamed on Windows being closed-source, plenty of other groups provide simple, easy-to-use installation and configuration utilities. Why should Qt be any different (i.e. why should there be so many “gotchas” with this piece of software)?
I don’t know if the installation was supposed to do this, but the VS.NET 2003 IntelliSense doesn’t seem to work. another quirk perhaps?
Finally, I posted in the user forums at Qt forum, and got a helpful tip: Don’t use Notepad in editing configuration files. It turns out that Notepad–the spartan little text editor that Microsoft bundles with every edition of Windows–was adding an invisible txt extension to the configuration files that I thought ended just with cfg.
Ummm duuuhhhh… Learn to change those _basic_ folder settings and you won’t run into these simple sort of quirks
Who is this guy?
he makes it clear that he’s a Mac developer.
Not everybody knows Windows inside and out, and this article is targeted to those people.
In case you didn’t notice, this was on smallbizmac.com — seems fairly self explanatory.
I’ve purchased 3 C++ toolkits for Windows, one for GUI, one for sockets, and the third was part of a special bundle which I don’t really care for I just wanted the first 2.
It came in source code form, complete with VC++ 6.0 workspace/project files. I open it in VC++ and hit F7 and wait, then the library and DLL files are ready to go.
I’ve also worked with other libraries where they come in as just a *.lib and *.dll file. All it takes is putting the lib file in VC++’s library search path, or add your own search path.
How does this non-commercial version compare to the package you get when you buy the commercial one? The least they could have done was provide pre-built static and/or dynamic libs to save us the hassle.
“Ummm duuuhhhh… Learn to change those _basic_ folder settings and you won’t run into these simple sort of quirks ”
That’s pretty forgivable for a person with Unix background, if you mean the “hide known extensions” thing. On Unix, file extension has basically no special meaning, it’s just a part of filename. It may seem strange for a Unix person to hide a part of filename.
“Ummm duuuhhhh… Learn to change those _basic_ folder settings and you won’t run into these simple sort of quirks ”
>That’s pretty forgivable for a person with Unix background, >if you mean the “hide known extensions” thing. On Unix, file >extension has basically no special meaning, it’s just a part >of filename. It may seem strange for a Unix person to hide a >part of filename.
By default notepad is used to create text files, ie files with extension .txt. If you need to add a different extension then you must change the file type in the save as dialog box.
If Unix file extensions have no significance when happens when you double click on a file with extension .txt under a GUI desktop (eg KDE or GNOME, I’ve never used them so I wouldn’t know) does it not do anything?
They do provide pre-built libraries. In fact, there’s no source code for the core libraries. I was focusing on building the samples, which had implications for building other applications against the libaries. The Borland 5 compiler is a bit of a kludge compared to GCC, in my view.
>If Unix file extensions have no significance when happens
>when you double click on a file with extension .txt under a
>GUI desktop (eg KDE or GNOME, I’ve never used them so I
>wouldn’t know) does it not do anything?
As far as I know most unix stuff does content sniffing to figure out that the file really is.
Though in the latest release of nautilus they changed it to use the name to guess what the file is when showing the listing in order to list files faster. Nautilus will still properly sniff the content of the file before performing an action on it liek opening it.
“By default notepad is used to create text files, ie files with extension .txt. If you need to add a different extension then you must change the file type in the save as dialog box.”
IIRC, you just pull down the little “Save As Type” box and choose *.* … it won’t append anything to the filename.
“If Unix file extensions have no significance when happens when you double click on a file with extension .txt under a GUI desktop (eg KDE or GNOME, I’ve never used them so I wouldn’t know) does it not do anything?”
That file is normally opened with text editor. But Unix filemanagers don’t rely solely on the “last part of the file name after a dot” to find out the file type, they also check file contents. I have a lot of text files in my home directory, and only a few of them have .txt extension. Nevertheless the filemanager correctly launches them in a text editor. In Nautilus or Konqueror you can’t sort files by extension, but you can sort by type. In Midnight Commander (it’s console based) there is an option to sort by extension, but it’s implemented incorrectly (it assumes everything after the first dot to be extension).
Quote:
“I’ve also worked with other libraries where they come in as just a *.lib and *.dll file. All it takes is putting the lib file in VC++’s library search path, or add your own search path. ”
That’s all it takes for Qt too.
And it’s done automatically.
Quote:
“How does this non-commercial version compare to the package you get when you buy the commercial one? The least they could have done was provide pre-built static and/or dynamic libs to save us the hassle.”
The Non commercial version is precompiled as a shared library.
Quote from the article:
“Could not launch make. Samples not built. For some reason, the installer could not begin to run the Borland compiler.”
Note:
The make problem is a Borland problem.
It’s actually Borland who doesn’t provide the automatical instalation. And that’s not something Trolltech can solve.
There’s a textfile on the cd that explains this, and what you need to do.
I said:
” And that’s not something Trolltech can solve.
There’s a textfile on the cd that explains this, and what you need to do.”
I mean:
And that’s probably something Trolltech can’t solve, because it’s technically not possible, or license problems.
There’s a textfile in the installed borland folder which explains what to do, not directly on the cd though.
Perhaps this further proves my point that installing software on Windows is not as easy as people claim it to be.
I can’t believe this is a story.
When you double click on a file, Nautilus or Konqueror read the Mime-Type in the file headers. If there is no Mime-Type read the file contents (known like Mime-Type magic) and if it can not identify the Mime-Type use the extension
File Headers -> File Contents -> File Extension
While I’m sure this is confusing for someone who hasn’t used Windows much, he’s in a pretty weird situation – someone who isn’t very experienced with the OS (doesn’t everyone turn off hide file extensions straight after install?), but is trying to compile a complex development library. The Notepad thing is _basic_, it should have been noticeable that the file changed icone etc…
Trolltech license per developer seat, so if you want to write a commercial app on win32 you need to pay a single seat license (over $1200) then you can distribute Qt with your app. What’s nuts is Trolltech still don’t recognise that Open Source can also be Commercial. So if you want to make Open Source apps for Windows, don’t use Qt. Just to really get the point across: you’re better off using Microsoft APIs directly than you are using Qt for Open Source development on Win32.
What’s nuts is Trolltech still don’t recognise that Open Source can also be Commercial.
No, what is nuts is a commercial Open Source project that’s whining about not getting “free beer”. If you make a living selling commercial Open Source software, then you can afford that one time fee. And it’s not a per-seat license, but a per-developer license, which means you only have to pay for it once even if you install it to multiple computers.
Qt probably isn’t suitable for shareware authors who only generate a few hundred dollars of revenue a year, but for everyone else it fits the bill.
Ok, you’re not getting it. Key point about Open Source software, the source code is available. Key point about source code, you can compile it. Now suppose I sell some commercial Open Source software for Linux that uses Qt (ie, anything that is written for KDE). The user can freely compile and use the software for whatever they like. Now suppose I want to do the same for win32. Oh, the user can’t compile the software for commercial purposes. They need to either 1) get me to compile it because I’m a licensed developer or 2) use the non-commercial version of Qt, assuming I bothered to make my software backwards compatible with the completely unsupported non-commercial win32 version of Qt. In any case, I’m not really selling Open Source software because I’m not supplying all the source code.
“By default notepad is used to create text files, ie files with extension .txt. If you need to add a different extension then you must change the file type in the save as dialog box.”
Antoher way to do this is to write the whole file name in quotes, like “myfile.xtx”, when you save it.
Cheers!
Another thing to be aware of is that if installing on an old version of Windows you need to ensure that the Qt Directory is not more than eight characters longs (I chose “qt321-nc”) otherwise the Borland C++ 5.5 compiler won’t be able to link to it.
Quote:
“you need to pay a single seat license (over $1200) then you can distribute Qt with your app”
The non commercial license allows you to distribute the Qt dll.
Quote:
“Now suppose I want to do the same for win32. Oh, the user can’t compile the software for commercial purposes. They need to either 1) get me to compile it because I’m a licensed developer”
What’s wrong with compiling your program?
That’s done in 99.99999% of all software that’s released, even on linux.
If your program is commercial, you can pay for the license, it’s not THAT expensive. Of course, for a shareware developer, it is expensive, but that’s not the target market of Qt.
I had zero problems installing Qt for Windows the first time I was introduced to it. The installer worked fine and built the included demo files without me really touching it at all, except clicking ‘next’ and such.
I agree the above comments that Borland’s compiler is flaky. I use Visual Studio 6 which appears to play nicer with Qt.
What’s wrong with compiling your program?
Sigh. Common Open Source usage pattern:
1. Download software
2. Use software
3. Find software lacking in respect X
4. Read and understand source code
5. Fix lacking feature X
6. Recompile
7. Enjoy software
How are you supposed to do step 6 if you don’t have a license to Qt? If you say “use the noncommercial version” I’m going to bonk you on the head. No-one who compiles against the commercial version of Qt makes sure their code is compatible with the noncommercial version (that defeats the purpose of using the commercial version in the first place) and it’s not legal to use the noncommercial version if you are using the software for commercial purposes (say, doing your invoicing).
Quote:
“How are you supposed to do step 6 if you don’t have a license to Qt? If you say “use the noncommercial version” I’m going to bonk you on the head. No-one who compiles against the commercial version of Qt makes sure their code is compatible with the noncommercial version (that defeats the purpose of using the commercial version in the first place)”
Do you know, that appart from a couple of components and some database drivers, the commercial and non-commercial are exactly the same?
So, any good programmer KNOWS if it will compile with the non-commercial edition.
Ok, when you look at the bugfixes in the later versions, it might be better to use the later commercial versions instead of the non-commercial version.
I think your “Common Open Source usage pattern” is a little bit flawed, or naive.
You say that people wouldn’t be able to recompile the program, but you forget the two very important steps in front of that, which are much much much harder than to recompile the program, and those are, like you mention
* understand the code
* fix the bug/add the feature
Those two steps are not performed by most common people, who have absolutely no understanding of computer programming. Even in the open source world, it’s not common that the average user can, or is willing, to update the code.
In fact, maintaining the code, fixing bugs, adding features, … is the programmer’s job, your job, not the user. The user uses your program, he/she doesn’t write it.
Not everyone is a software engineer, or wants to spend several weeks trying to understand where the problem might be, while you, the programmer could fix it considerably faster and even better.
But, you’re right, if you use the commercial components, then any person who does want to recompile it, needs to have a commercial license too.
Tip: You, the creator of the program, are not forced to use those components that are only available in the commercial version. You have the power to make it compatible with the non-commercial version.
quote:
“and it’s not legal to use the noncommercial version if you are using the software for commercial purposes”
What do you expect?
Someone puts years of development into something and you use it for free to make money off of them?
If you can find me one example where this is possible, please feel free to mention it.
On the other hand, if you only use that program at home for commercial purposes, who’s ever going to know which license you have? Or even if you wrote the software with Qt?