Hello, I was wondering which one should I consider if I need the software to be used on both platforms, WIN and Linux and why?
They are both fine toolkits. I'd base my decision on the licensing. Qt requires that you pay for a license if you are using it in a commercial product wheras GTK does not.
GTK+ you can use almost in all programming languages, in C++ (using gtkmm) in C (gtk+) in C# (with Gtk#) in Python (PyGtk). Behind GTK you have Mono Framework which is great implementation of .NET Framework for cross platform purposes. If you want to use Gtk# you have great IDE (MonoDevelop) with a very powerful gui designer. You can take a look at www.mono-project.org. But still depends what do you want to build, you are looking just gui toolkit, or the entire framework? And the logic behind signals/slots are the same in Gtk+ and Qt, but if you are using Gtk# they are transformed in the delegates/events paradigm.
my $0.02:
I've used Qt off and on for the last 4 years, and it's hands-down my favorite toolkit of anything I've tried (Win32, MFC, Borland, Java, GTK). I used GTK for a few weeks to try it out, and didn't like it. Mostly that was because I think it's awkward to use C instead of C++ for GUI apps on a PC... I do embedded work too, and I'd never use C++ on an 8051, but for a big GUI app I much prefer it. If you're going to try GTK, I'd suggest looking in to GTKmm, although I've never used it myself.
You might also consider wxWidgets. I have never used any of them but when I was looking over the cross-platform toolkits it was the one I had decided to try.
Both are good toolkits that have their advantages and disadvantages.
The license is a big one. As mentioned by Adam Pierce, GTK+ is licensed under the LGPL, which allows you to use it in commercial applications without a fee. Whereas Qt is available under the GPL, which requires that any code that uses it must also be GPL-compatible. Alternatively you can buy a commercial license for Qt which allows you to use Qt with a proprietary product.
Another difference is implementation language. Qt is in C++, and GTK+ is in C. However GTK+ has bindings for many, many other languages (perl, python, C++, .NET, etc) so it's not a huge issue.
An Advantage of Qt is that it offers a bit broader range of functionality built in (xml, database access, network programming, openGL, etc). GTK+ has basically all of these things within its orbit (e.g. libxml2, librsvg, libsoup, libgda, etc), but they're not as much of a single coherent package as Qt is.
My personal recommendation is to use gtkmm, the C++ bindings for GTK+. It offers a more comfortable object-oriented language to program in, and it provides nearly the same native performance as using GTK+ from C. (Disclaimer: I contribute to gtkmm).
Packaging GTk and its dependencies on Windows is a full-time project in itself. Qt is much more easily distributed since it has no dependencies that do not come with Windows.
Qt has been cross platform from the start. GTK has not always been cross platform. Such fundamental decisions shape the overall design, and should be made before any code is written in my opinion.
I would comment more, but I'd be drifting into speculation, the above two things I know for certain.
Three additional points in favor of Qt:
- Your project does not have to be GPL; there are many other open-source licenses available in the Qt GPL Exception, including BSD and LGPL.
- Qt's default theme on Windows does a much better job of blending in than GTK's Wimp theme.
- If you want to support Macs later, you'll have a much easier time with Qt.