60 Comments
- diggapleaze, on 10/11/2007, -1/+28I'm a die hard gnome user and have traditionally worked with GTK. After checking out QT4, I hate to say it, but QT is presently far far superior compared to GTK in almost every way.
I still use a gnome desktop because I prefer it's design philosophy over KDE's (I wholeheartedly believe that "less is more"). But damn, Trolltech and the FOSS contributors to QT have really crafted an amazing cross-platform widget toolkit. It's even a great platform for proprietary applications, just look at Skype, Google Earth, and Photoshop Elements. QT looks great on Windows and the Mac, which unfortunately GTK can't quite do as well (GTK on the Mac requires the user to install X11 from their OS X installation disc, and it doesn't look Aqua-native at all).
Do yourself a favor and check out an app shipped with QT called "qtdemo", or at least watch this Flash demo here http://chaos.troll.no/~marius/qtdemo/ . All I can say is WOW. A lot of people are quite surprised to see what QT is capable of after playing around with qtdemo for a little bit! Apple and Microsoft are innovating the GUI toolkits with Core Animation and WPF, so QT is really looking like the only relevant competitor for the near future. - fkr3, on 10/11/2007, -9/+30And a crap way to learn. You don't dive in to a completed application's source to learn how to program, you find tutorials like this that hold your hand and teach you what you're looking at.
- leobaby, on 10/11/2007, -0/+20There's no denying how helpful it is to see the inner workings of a completed program.
- bysin, on 10/11/2007, -2/+18"The word 'this' is a pointer to our application and it just says that the slot we are connecting to is in this application. Like I say I am no expert on C++ or Qt and I do not have all the answers but this explanation of 'this' will suffice until I know better."
This guy is a ***** C++ programmer. - schestowitz, on 10/11/2007, -10/+26Another option is to take an /exisiting/ Qt application which is GPL-licensed and then modify the code, probably through reduction (feature/widget stripping). It's the permission to modify and study existing code which makes this approach so productive. And it's perfectly legal and ethical.
- brianez21, on 10/11/2007, -0/+14Dude, there's no MAKEFILE! I think you mean "gcc hello.c" :D
- BrainInAJar, on 10/11/2007, -1/+12Hi,
Qt works on BSD, OSX, windows, Solaris...
you're not creating a "Linux" desktop app, you're creating a Qt app, it's quite portable
This holds true for most unix apps, at most you're creating a POSIX/UNIX app unless you make Linux specific system calls ( and even then most of the time they can be trivially ported, kernel modules being an exception ) - socokoolaid, on 10/11/2007, -0/+9I think he used the angle brackets on the include file name and digg stripped it.
- ThinkFr33ly, on 10/11/2007, -9/+17.NET is free, buddy. Stop getting all your information from Slashdot.
- bmartin, on 10/11/2007, -0/+8Try doing a Google search for: GTK tutorial
- zephc, on 10/11/2007, -2/+10make: *** No rule to make target `hello'. Stop.
- fkr3, on 10/11/2007, -0/+8I think he looked at how much space was being used .. by everything.
- Mejogid, on 10/11/2007, -0/+7Can you give some examples of that? I've only ever used GTK, and the C bindings in particular are a complete mess. The python setup OTOH's pretty sweet - what advantages does QT offer over that for example (besides a choice in languages)?
- Buelldozer, on 10/11/2007, -5/+12If SQL Server 2005 is "free" then why is CDW selling it for $869???
http://www.cdw.com/shop/products/default.aspx?EDC=877965
I think you meant the Desktop Edition is free but there's a lot of different between the DE and full on SQL Server. - M4v3R, on 10/11/2007, -2/+9It still won't work, #include needs a filename:
#include "stdio.h"
But you can also omit this. - sirhomer, on 10/11/2007, -9/+15As usual the Microsoft fanboys come to derail another Linux thread.
- GMorgan, on 10/11/2007, -0/+5For those who haven't used C++ or Java, this is a pointer/reference to the object from which it is called from within.
//@rosstizma - you can call QT from within Java.// - daftman, on 10/11/2007, -0/+5Why QDevelop? I use KDevelop. Anybody here know whether QDevelop is better as I would think that KDevelop is much more polished.
And why isn't this in the programming section? - tunesguy, on 10/11/2007, -0/+5A few obvious ones come to mind:
http://www.gtk.org/tutorial/
http://www.gtkmm.org/documentation.shtml (for C++ bindings)
Also, you might want to check out the newly-released book, "Foundations of GTK+ Development (Expert's Voice in Open Source)" by Andrew Krause. - p0tent1al, on 10/11/2007, -4/+9Asp.net is proprietary and usually costs more when you looking to host it, as opposed to PHP.
- Xanium4332, on 10/11/2007, -2/+7if it's 3gig then how do you think liveCD's (emphasis on CD) such as kubuntu and knoppix run, get your facts right!
- Xanium4332, on 10/11/2007, -0/+4Most of them are out of date and not very good, as Glade has recently changed. Anyone got a link to an up to date gtk/gnome/glade guide? Preferably easy to follow :P
- vikingr, on 10/11/2007, -2/+6Is there some similar Tutorial for creating a simple GNOME/GTK app?
- filipf, on 10/11/2007, -2/+6.NET Framework SDK IS FREE. Microsoft offers several of its "Express" (dumbed-down versions) of Visual Studio for free. There are also free tools from other parties, most notably SharpDevelop from icsharpcode.net. As far as ASP.NET, it's also free. The Mono project provides a plugin for Apache as well. And there is a PHP to .NET compiler that makes all the PHP code run way faster under .NET.
.NET is super cool. What Microsoft needs to do is to open source it. - eean, on 10/11/2007, -0/+4mejogid: in my experience you really have to use an API to decide whether its any good or not. Since its all about the details.
And Qt just does a great professional job. - fkr3, on 10/11/2007, -2/+5@ leobaby -
Yeah, once you actually know enough to understand any of it. It might as well be in Chinese (assuming you don't speak Chinese) if you're just starting out or learning the language.
@ bysin -
He also says he doesn't know what the necessary packages to include are lol. - icefox2, on 10/11/2007, -0/+3So if you want to use Qt in a commercial non GPL application to presumably sell and make money from, but you are not making enough money to buy a Qt commercial license. Does that mean that your business might go bust soon?
- GMorgan, on 10/11/2007, -0/+3make clean, problem solved.
- inkubux, on 10/11/2007, -5/+8"Visual Studio is available for free. The .NET Framework is available for free. SQL Server 2005 is available for free." yeah right it's free on thepiratesbay.org
- batmant, on 10/11/2007, -0/+3I'm a Qt developer, it's really a fun toolkit to use. I'm glad to see it's gaining traction.
Better title for this article would be create Linux / OSX / Windows desktop App in 14 minutes! It's cross-platform-ness is great. - socokoolaid, on 10/11/2007, -0/+3Thats the Ubuntu/Vista look. Load it up in Slackware, it looks nicer. ;P
- M4v3R, on 10/11/2007, -2/+4Visual Studio.NET is free only for Express (the most basic edition, no remote DB support, etc.). The rest cost money as well.
Edit: Whoops, wrong thread, should be below. - hockey, on 10/11/2007, -2/+4QT4 is an impressive toolkit however. . .
From the looks of it GTK just seems to be easier to code for. I mean if you are going to need all the advanced functionality that QT gives then go for it. However if you just want to write a smaller application then GTK just seems like it would be easier.
GTK IMO doesn't provide all the bells and whistles of QT because it's just a simple widget toolkit.
I mean that "Hello World" tutorial looks like it's much more complicated than the GTK equivalent. - GMorgan, on 10/11/2007, -0/+2QDevelop seems to use the QT Designer RAD GUI editor just like KDevelop. QT4 is basically QT3 plus the added stuff KDE used to pile on top of QT3 in any case so KDevelop can't really be accused of being KDE centric anymore. Since this stuff is built in it makes a sizeable performance increase for KDE.
- Mejogid, on 10/11/2007, -0/+2Search for pygtk tutorials - a very easy back end with some of the best GTK bindings out there. Python's a very usefull language too.
@xanium - Glade 3 functions almost identically to Glade 2, except it obeys the Gnome HIG, has pretty icons, doesn't crash randomly and has sane keyboard shortcuts and the like - copy and paste and delete work, for example. - Xanium4332, on 10/11/2007, -4/+6If only QT4 had a decent license, as you have to pay to use it commercially, which rules out using it with my company's software (and before you all start complaining that my software should be open source, if it were, I'd wouldn't be able to pay the bills (it's also sold alongside some hardware, you can't just buy the software)). So until trolltech changes their licensing terms (which would also put them out of business), I'm going to have to use GTK.
- GMorgan, on 10/11/2007, -0/+2"Or you could use one language, Java, and make it a webapp so it's portable."
The problem with that is that Swing is a pain to code in. The performance issues are gone and when you set LAF the applications look native now (have a look at Netbeans 6 under GTK LAF in Java 6, looks as native as any GTK app). This doesn't alter the fact that the code is just awkward. It's not enough to be cross platform, it must be easier to code in (the rest of Java isn't bad but Swing). Fortunately I think JavaFX is going to save the platform here. You can mix JavaFX and Java classes at will and it is *much* easier to code GUI's in JavaFX. I think this sort of mixed language development on the JVM will be the future of it. Other environments talk of allowing access to other languages and Java is criticised as being 'All languages are 4 letters long and start and end with J and a' but the work of Java integration with other languages is fantastic and they are ahead of other portable platforms on this front*. Now if only Sun would advertise this fact rather than letting the FUD spread.
Still I'd like a competent Qt LAF for Swing. Until then I'll stick with JavaQt if I use Java with perhaps a Swing port as well if it isn't too much brain *****.
*JavaFX, JRuby, Jython, Groovy and Scala can practically import all Java classes and many can go the other way as well. - inkubux, on 10/11/2007, -1/+3Just have a look at Glade to accomplish the same kind of things :)
- Xanium4332, on 10/11/2007, -1/+3EDIT timed out:
Does anyone have a link to an equivalent (and up-to-date) guide for GTK/Gnome? - GMorgan, on 10/11/2007, -0/+2.Net isn't really that much different from Java. In fact the JVM is generally superior to .Net though C# is a nicer language than Java right now. Really we want C#.JVM ;).
Then again Java looks likely to get a few new toys like closures and operator overloading for the next version and there are some Java features that are superior to the C# versions. Particularly the Java enums (which are really just plain old java classes but different at the syntax level) do some interesting things that _can_ be of more use than plain enumerations like those found in C#. - bart9h, on 10/11/2007, -2/+4@xanium4332: You missed a good opportunity of staying quiet. What is included on liveCDs and all other distros is only the final binaries, but the compilation process creates a lot of object files and other intermediate files, that's why it takes 3GB.
Have you ever compiled the Linux kernel? The compressed source is 30ish MB, it expands to a lot more, and after compiling the tree consumes a huge amount of space (I don't recall, but something around 1GB maybe). Yet, the final product, the kernel image and the modules, are just a few MB in size. - nybble41, on 10/11/2007, -1/+3"Dude, there's no MAKEFILE! I think you mean 'gcc hello.c' :D"
Actually, you don't need a makefile for a program that simple. Make has a built-in rule for "%: %.c". It also has built-in rules for "%.o: %.c" and "%: %.o". If you really wanted a makefile (so you could just run "make" or "make all") it could be as simple as
all: hello
hello: hello.c - Xanium4332, on 10/11/2007, -0/+2OK I forgot to add that a C/C++ GTK/Gnome/Glade tutorial I think we're all looking for. A PyGTK won't have the performance for embedded devices, for example.
- adolfojp, on 10/11/2007, -0/+1@vikingr (#6923912)
http://www.monodevelop.com/Stetic_GUI_Designer
Mono and C# and GTK tutorial in a Visual Studio like designer. - slapthemonkey, on 10/11/2007, -0/+1Thanks schestowitz for the info.
- fkr3, on 10/11/2007, -4/+5http://www.microsoft.com/sql/editions/express/default.mspx
It's more than adequate for learning SQL Server and for many web/desktop applications. It's also freely redistributable with your applications.
It's not a solution for a heavily trafficked website or for a huge application assloads of people are going to use, but those are probably about 1% of software produced. - clivecooper, on 10/11/2007, -0/+0Thanks for all the comments everyone.
Yes, I agree, I am not a good C++ programmer, I only started C++ and Qt about 2 months ago, I have a lot to learn.
Perhaps the guys with the negative comments could paste their tutorial on C++/Qt and enlighten us all as to how it is supposed to be done?
The point behind the tutorial was to enable noobies (like me) to get started in C++/Qt and judging by the email replies I have had it would appear that most have found the tutorial useful. - YodaJones, on 10/11/2007, -9/+6Hi Clive - Great article! I am going to link to you on our new ubuntunoob.com web site.
- trollick, on 10/11/2007, -7/+314 minutes? 14??? That kind of app should not take longer than 1 minute.
- fkr3, on 10/11/2007, -11/+6Visual Studio is available for free. The .NET Framework is available for free. SQL Server 2005 is available for free. MSDN is a vast and freely available knowledgebase full of professionally written examples, guides and explanations.
Of course, you have to buy Windows. But since the vast, overwhelming majority of people have Windows, you're the exception if you don't. -
Show 51 - 60 of 60 discussions



What is Digg?
Check out the new & improved