Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

In-Depth With Qt 4.4 253

QtPi writes "Trolltech has announced the availability of Qt 4.4, the cross-platform software development framework. Ars Technica has an in-depth look at the release, which include an integrated WebKit-based HTML rendering engine, the new Phonon multimedia framework, support for Windows CE, and significant improvements to the QGraphicsView system. 'Qt 4.4 brings a lot of rich new capabilities to the toolkit that are sure to please open source and commercial software developers. It sounds like Trolltech already has some nice plans for Qt 4.5, and we will hopefully get to hear more about the long-term roadmap after Nokia completes its acquisition.'"
This discussion has been archived. No new comments can be posted.

In-Depth With Qt 4.4

Comments Filter:
  • by Enleth ( 947766 ) <enleth@enleth.com> on Tuesday May 06, 2008 @06:44PM (#23318368) Homepage
    Graphics View alone is an extremely powerful tool - now it seems to be able to do things no other toolkit comes even close to. I can't wait to use 4.4 in an application I'm developing right now (a game map editor), this feature will allow me to make some parts of the user interface a whole lot simpler and more intuitive, throwing away a bunch of docks and toolbars in favor of a more interactive workspace.
  • by Anonymous Coward on Tuesday May 06, 2008 @06:59PM (#23318500)
    Vladimir just posted about working more on Qt for Firefox - http://blog.vlad1.com/2008/05/06/well-isnt-that-qt/ - the more devs that can help, the quicker this will happen.
  • by timmarhy ( 659436 ) on Tuesday May 06, 2008 @07:04PM (#23318538)
    "Qt is much more portable"

    bullcrap. name a platform qt works on that wx or gtk doesn't? i admit gtk looks crappy on some, but wx looks native on all of them AND provides a shit load of default widgets

  • by Rhapsody Scarlet ( 1139063 ) on Tuesday May 06, 2008 @07:05PM (#23318546) Homepage

    Nobody needs Qt when there is WxWidgets and/or GTK. Qt's point is moot

    The ZSNES developers for one prefer how Qt works [zsnes.com] and R. Belmont (of MAMEdev fame) also stated that the only reason he used GTK+ on the Linux port of Audio Overload was because various portions of the code weren't compatible with the GPL. If they had been, he'd have used Qt instead. I also prefer Qt, hence why I use KDE in preference to anything else and why I view the possibility of Mozilla using Qt [vlad1.com] with some excitement.

    I'd go as far as to say that GTK+'s 'killer feature' these days is the licence. The fact that it uses the LGPL as opposed to the GPL and was open sourced well before Qt is why it's remained so popular. In most other respects, Qt is the better toolkit.

  • by QuantumG ( 50515 ) * <qg@biodome.org> on Tuesday May 06, 2008 @07:08PM (#23318562) Homepage Journal
    It looks quasi-native.

  • by thzinc ( 679235 ) on Tuesday May 06, 2008 @07:18PM (#23318672) Homepage
    It was Keyhole's engineers that made that decision, not Google's.
  • by Anonymous Coward on Tuesday May 06, 2008 @07:20PM (#23318696)
    GTK looks terrible on Windows and Mac and doesn't even warrant consideration unless you're developing strictly for Linux or BSD. Further, GTK and WX are both lacking a ton of features that are found in modern toolkits like Cocoa or QT.
  • Re:ActiveX WebKit (Score:3, Informative)

    by slimjim8094 ( 941042 ) on Tuesday May 06, 2008 @07:48PM (#23318918)
    http://www.iol.ie/~locka/mozilla/mozilla.htm [www.iol.ie]

    Wine uses it. It's as standards-compliant as Gecko, which is probably enough for you (unless it's an evangelical thing)

    In any case, it's better than Internet Explorer's ActiveX (where standards are concerned)

    NOTE: That link's a bit old, but should be more than adequate.
  • by Anonymous Coward on Tuesday May 06, 2008 @07:50PM (#23318930)
    Why are you comparing Wx or GTK to Qt? Does either of those have platform independent threading, sockets, etc?

    As far as UI design, wake me up when either of those has anything even remotely competetive to QtDesigner.
  • Comment removed (Score:5, Informative)

    by account_deleted ( 4530225 ) on Tuesday May 06, 2008 @08:02PM (#23319004)
    Comment removed based on user account deletion
  • by mR.bRiGhTsId3 ( 1196765 ) on Tuesday May 06, 2008 @08:17PM (#23319096)
    Yes.
    http://library.gnome.org/devel/glib/stable/glib-Threads.html [gnome.org]
    http://library.gnome.org/devel/glib/stable/glib-IO-Channels.html [gnome.org]

    Granted, Glade is vastly inferior QtDesigner, but such is life.
  • by Anonymous Coward on Tuesday May 06, 2008 @09:05PM (#23319386)
    I am not sure but reading your post it seems you are under the belief Qt is licensed per application.

    The Qt licensing model is that you a license fee per developer, depending on the number of platforms you want to target.

    One of the key values Qt brings is the single codebase / multiple platform way of developing.

    If you wanted to port a rich client application to Linux and Mac OS/X you would not be able to use your MSDN subscription for much, whereas with Qt you would recompile your app. You would have to be extremely fast and/or have a very low hourly cost not to save money on this relative to doing a rewrite / port / multiple codebase approach (for any non-trivial application).

  • by Jeremi ( 14640 ) on Tuesday May 06, 2008 @09:11PM (#23319438) Homepage
    But for the cost of one license for MSDN you can only license one application for Qt development, both per year.


    Huh? A Qt license is expensive, but once you have it you can create all the Qt apps you want. At least, that's what my Qt license says. I think you have been misinformed.


    But, per application, recurring per year, its expensive


    Again, there is no "per application" charge. The "per year" charge is if you want support -- if you don't want/need support, just buy the Qt license and don't renew it after a year. You'll still be able to use the version you bought indefinitely.


    And should we port to Linux and Mac OS/X, our licensing fees for MSDN would be £453 (approx $1116) and our Qt fees would be $126,000).


    Are you talking about porting a .net app to Mac and Linux? Most Win32 apps wouldn't be "ported" so much as "rewritten from scratch", and for a non-trivial app the rewrite would cost a lot more than $126,000 in developer time. Maybe C#/.net apps run just as well on Linux and OS/X as they do under Windows, but if so that is news to me. Portability what makes Qt worth the money... being able to support Linux, Windows, and Mac with a single codebase that you only have to write and debug once is a huge win.

  • by codemachine ( 245871 ) on Tuesday May 06, 2008 @09:31PM (#23319590)
    A number of possible answers, with varying degrees of importance/truth depending on your opinions:

    - Because QT is cross platform.
    - Perhaps it saves enough development effort over the MS stuff that it is worth the cost.
    - It has a GPL version on all the major desktop platforms, so fully OSS apps are possible
    - Is compiled instead of interpreted

    There are probably lots more differences between the platforms that I missed as well. Not all of them would favour QT. Depends what you're looking for I guess.

    But it isn't surprising that QT is popular with much of the Slashdot crowd, since it is GPL and supports non-Windows platforms. So I'm not sure why one would even have to ask why people here prefer QT over MSDN and Visual Studio.
  • Re:Framework hell (Score:5, Informative)

    by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Tuesday May 06, 2008 @09:53PM (#23319708) Journal

    But each of those 100 ko apps depends on a different version of the 10 Mo library.
    In short, no they don't.

    Using one version of a library with an application designed for one version often results in framework hell.
    You linked to "dependency hell", which is a solved problem -- see package managers. It is not only possible, but easy, to install multiple versions of the same library. And if the library is reasonably high-quality (like Qt), you're not going to need ten versions of it. On a bad day, you might need two (3 and 4).

    I haven't been on Redhat in awhile, so maybe it's still an issue there. I remember RPM being a bitch, but I haven't used RPM since 2002. On Ubuntu, I have exactly one version of libqt-mt installed, and it weighs in at about 11 megs. And because this is Kubuntu, it's installed already.
  • Re:Framework hell (Score:5, Informative)

    by UngodAus ( 198713 ) on Tuesday May 06, 2008 @10:39PM (#23319978)
    Actually, in Qt we have a mandate for backwards binary compatibility. Only if it's an absolute necessity is binary compatibility broken, and I honestly can't think of a single time in the 4.x stream of code that we have done that. So, your "framework hell" argument is moot. Only the latest version of Qt is "needed", and should support all applications compiled for previous revisions of Qt4.
  • by EvilIdler ( 21087 ) on Wednesday May 07, 2008 @12:02AM (#23320464)
    Gtk+ does GUI and threading, but wxWidgets is a complete application framework with networking, filehandling and a whole lot more abstracted. Plugin libraries exist for both to extend them, and I'm sure there is at least some basic file abstraction in Glib (which is required by Gtk+).

    Licensing aside, I rate Qt and wx about the same in features. They both seem to get the native look on OS X, and wxWidgets takes on the Gtk+ theme on X (which is an engine using the KDE theme).
  • by willy_me ( 212994 ) on Wednesday May 07, 2008 @01:01AM (#23320766)

    on mac os x qt4 looks good to me, there is even an alpha version of qt4 that uses cocoa instead of carbon

    The problem is not the look, it's the feel. It is the way the toolbars work, dialog boxes, etc. It is the way all the pieces fit together to provide a user interface. Qt is impressive but it is not native.

    there is even an alpha version of qt4 that uses cocoa instead of carbon

    Cocoa and Carbon are actually the same thing. Just different APIs used to access the same elements. Qt adds yet another API which is fine but there is no real difference in Qt using Cocoa vs. Carbon. Ok, there is one difference. Carbon will never be 64bit so if Qt wants to be 64bit native then they will have to utilize Cocoa. This is likely why the Qt engineers are looking into Cocoa.

    Willy
  • by shutdown -p now ( 807394 ) on Wednesday May 07, 2008 @05:04AM (#23321716) Journal
    The reason for the size of Qt is that it is analoguous to the all-encompassing class libraries of Java and .NET, but in C++ world. Which is for the better - it is much more productive to have all the common, and even the less-so-common functionality readily available as needed. Add to that the great quality of Trolltech offering, and who cares about a couple extra megabytes?

    Anyway, Qt is pretty much the only reasonable choice for cross-platform C++ development, and a very strong contender even if you're going to stick to one platform only. It's got great documentation, and the development tools are very nice; particularly now with Eclipse integration of their form designer, there's finally something in the Linux land that can compete with Visual Studio in terms of UI development. Of course, on Windows, you can have VS integration, which is the best of both worlds... ;)

  • by shutdown -p now ( 807394 ) on Wednesday May 07, 2008 @05:18AM (#23321774) Journal

    So, here is my question: in Qt 4, can we do signals and slots programmatically, or do we still have to use qmake?
    I imagine you mean "moc" ("meta-object compiler") here rather than qmake. You can call moc yourself without any problems, and you can run it from post-build actions for files in your project you need preprocessed. It's all there in UI in VS2008. And, of course, if you buy Qt4, you'll get full integration with all modern VS versions out of the box.

    IIRC, you always could do signals/slots programmatically - after all, moc is not some kind of magic, it just generates all the boilerplate C++ code. It's not exactly convenient, though (not like e.g. boost::signal), precisely because it's not intended to be used manually.

  • by bestinshow ( 985111 ) on Wednesday May 07, 2008 @06:06AM (#23321900)

    How much does a new motherboard that has slots for 4 GiB of RAM cost?
    Hmm, $75 - $125? And CPUs are dirt cheap too now.

    But ignoring that, KDE4 will run on a system with 512MB RAM, and my PC 5 years ago had that. 1GB of RAM, even old DDR 1, won't cost much if you need to upgrade.

    If you're on an older machine still, maybe you should change job or something.
  • by Ringlord ( 82097 ) on Wednesday May 07, 2008 @06:38AM (#23322032) Homepage
    I like C++ GUI Programming with Qt 4 very much. Details here http://troll.no/developer/books/2
  • by vally_manea ( 911530 ) on Wednesday May 07, 2008 @08:09AM (#23322482) Homepage
    Yeah, that's right because the whatever version of the .NET framework is freaking tiny at 30MB+
  • by BBandCMKRNL ( 1061768 ) on Wednesday May 07, 2008 @11:15AM (#23324146)

    And seriously, even with all of them you're talking 10-15MB in a world where 4GB DDR2 costs 60-65$.
    It was this mentality that brought us Vista. Seriously folks, just because the RAM is there and the CPU is there does not mean you should be extra wasteful. This is why computers are following Moore's Law but not really getting any faster.
    I have to disagree here. This has nothing to do with being extra wasteful. 15MB is less than .4% of 4GB. I started writing code 30+ years ago on IBM 360s and DEC PDP-11s. I'll ignore the mainframe in my comments here since the PDP-11 was closer to early PCs in performance. On the PDP-11 you had 16KB of user address space to write your application in. There was no indexed file system let alone an RDBMS. The hard drives had 512KB of storage. You were sharing these resources with up to 3 other users. The UI was 80 x 24 characters. Any meaningful business program was at least 2 programs; one for data entry and a second to do the actual processing and file updates. You had to do it this way because you couldn't do both in 16KB.

    That 15MB in today's world is like 64 bytes was in the PDP-11 world. In fact it's even less since if you don't use all 15MB it isn't going to be mapped into memory. In the PDP-11 world, there was no virtual memory.

    Computers have gotten faster. The problem is that user expectations have risen at an even faster rate. 30 years ago, a "Cash flow projection" was a report generated in batch once a day. Today it's an on-demand drill down into a database allowing multiple what-if scenarios.
  • by Cigarra ( 652458 ) on Wednesday May 07, 2008 @04:53PM (#23329566)

    On Windows the best development tools are moving away from C++.

    You don't have to use C++, you know. There's PyQt [riverbankcomputing.co.uk], for example.
  • by UngodAus ( 198713 ) on Wednesday May 07, 2008 @08:08PM (#23331784)
    I recommend using QDevelop [qdevelop.free.fr] with the free version of Qt, it's coming along quite nicely, and makes the whole experience quite nice to use with the mingw32 compiler. I've not kept up with the state of free/msvc integration, but yes, you won't get all the niceties of help file/designer/auto-moc'ing that vs integration gives you with devstudio express. The reason for that is because microsoft doesn't allow extensions to be loaded into it, which is how the vs integration stuff works.

What is research but a blind date with knowledge? -- Will Harvey

Working...