Results 1 to 15 of 15

Thread: qt weak points and disadvantages?

  1. #1
    Join Date
    Nov 2009
    Location
    Novosibirsk, Russia
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qt weak points and disadvantages?

    Dear QtCentre experts,
    right now I am working on report about using Qt in the development of large and complex software systems. I 've been involved in such process myself for about a year, so I have some exprience. We've used Qt successfully.
    I would like to do some analysis - compare Qt to existing frameworks (probably to Java and .NET too), and need to be very objective and impersonal. I have found some articles so far (Java vs Qt, MFC vs Qt), but I want to mark distinctly Qt weak points. We had some problems with Qt - qmake issues and old C/C++ code integration difficulties, but it's not such a big deal.
    Could anyone help me with determining Qt disadvantages?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt weak points and disadvantages?

    The only real disadvantage I'm aware of is the size of Qt. The smallest statically linked app is over 4MB, or you can distribute 10MB of DLLs.

    Some debugging tools are not available because of the way Qt works (eg. To Windows, a Qt app is just a single window with no controls, so you can't intercept messages to a certain control). This can also cause some performance problems, as the application can be processing thousands of messages which would normally only be sent to the relevent controls by the OS.

    But, the way Qt does things has some big advantages: Portability, Flexibility, Openness, and various others.

  3. The following user says thank you to squidge for this useful post:

    kokonech (28th November 2009)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Ouch... let's clear some things.

    Quote Originally Posted by fatjuicymole View Post
    The only real disadvantage I'm aware of is the size of Qt. The smallest statically linked app is over 4MB, or you can distribute 10MB of DLLs.
    You can cut down the size of the libraries if you want to. You can build a static app does something useful that is less than 1MB in size. To argue on the size we would have to compare a statically linked Qt application against another statically linked application with the same functionality but not using Qt.

    eg. To Windows, a Qt app is just a single window with no controls, so you can't intercept messages to a certain control.
    That's not true. It is so only by default so that things work faster. If you disable Alien Windows, you get a native handle for every widget in your application.

    This can also cause some performance problems, as the application can be processing thousands of messages which would normally only be sent to the relevent controls by the OS.
    Do you have any proof to back that up?


    Now for the disadvantages:
    1. Qt is growing very big so it is hard to learn it without external help. Fortunately once you get the hang of things, all becomes much easier
    2. People expect Qt to do magic and they keep searching for non-existing ways how to do something "the Qt way" instead of doing it the simple way. I don't know how to solve that - maybe by improving the documentation (although it is really great as it is)
    3. There are many problems with installing database drivers. It's not really Qt's fault but it would be better if there was a way to do it in a simpler way.
    4. Qt requires vast amounts of disk space for compilation (mostly due to WebKit). Not a big deal unless you're low on disk space.
    5. QObject and QWidget are not thread-safe, painting is not possible from threads - it's not a problem only Qt encounters so it's not a "disadvantage" but it is starting to be a weak point of most toolkits
    6. QMake is outdated (and complicated for more advanced projects) and everyone knows that. Trolls are looking for a better build tool even now.

    All in all most of the things I mentioned are not big issues we can't live with so overall I would grade Qt as 9 out of 10.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    kokonech (28th November 2009)

  6. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by wysota View Post
    You can cut down the size of the libraries if you want to.
    I'm aware of this, but I eventually got tired of rebuilding Qt to try and get the size down to minimum (disabling some things in qconfig causes compile errors sometimes - I assume because it doesn't remove everything properly every time), and then when I got something small that worked, I noticed later on my application didn't work as I was using things which were not built into release mode of library, and then you have to rebuild again. So now I just use full size library and complain about size

    Quote Originally Posted by wysota View Post
    That's not true. It is so only by default so that things work faster. If you disable Alien Windows, you get a native handle for every widget in your application.
    Really? I thought the way Qt always worked (and has it was massively portable) was by drawing everything itself.

    Quote Originally Posted by wysota View Post
    Do you have any proof to back that up?
    Proof as in benchmarks? No. However, I notice that via Spy++, Qt application receive message for every movement of mouse with new mouse co-ordinates, along with hundreds of hittest messages and various others. On the same app written for MFC, the application receive far fewer messages as a lot more is done by the OS. From that I came to the conclusion of "Fewer messages to process = Faster performance".

    But like I said, I like Qt. It has disadvantages, sure, but those are worth it to get its advantages.

  7. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by fatjuicymole View Post
    Really? I thought the way Qt always worked (and has it was massively portable) was by drawing everything itself.
    It matters what it draws on. With recent Windows and Mac platforms system routines are used for drawing but that's irrelevant. What is important is that drawing takes place either on one big canvas (top-level widget + Aliens) or a hierarchy of smaller canvases (all real widgets).

    Proof as in benchmarks?
    Anything... Is it just your own thought that it is so or did you read about it somewhere or...?

    No. However, I notice that via Spy++, Qt application receive message for every movement of mouse with new mouse co-ordinates, along with hundreds of hittest messages and various others. On the same app written for MFC, the application receive far fewer messages as a lot more is done by the OS. From that I came to the conclusion of "Fewer messages to process = Faster performance".
    I can't argue with that but I'm not convinced it has anything to do with performance.
    It's probably mostly related to the fact that your style has the hover mode turned on for Qt (or XP/Vista/7 actually) and from what I know MFC doesn't handle such things at all (meaning you don't get hover effects over buttons, etc.). You'd have to compare that with a Qt style that doesn't enable the hover flag (like probably Motif).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by wysota View Post
    I can't argue with that but I'm not convinced it has anything to do with performance.
    Well, it takes a certain amount of processor power to process a message, so the more messages you process per second, the more processor power required for that application?
    Quote Originally Posted by wysota View Post
    It's probably mostly related to the fact that your style has the hover mode turned on for Qt (or XP/Vista/7 actually) and from what I know MFC doesn't handle such things at all (meaning you don't get hover effects over buttons, etc.). You'd have to compare that with a Qt style that doesn't enable the hover flag (like probably Motif).
    I can write an application that shows a popup (hint) when the mouse hovers over a control. Such an application can process zero messages to do that, as the OS will highlight the button and then show the hint/popup after a delay. The app only gets a message if the button is actually clicked. Sure, the app could ask for mousemove messages whilst over that control, but there is no need if the OS will do the work you want anyway.

    However, I do agree that the processing has to occur somewhere, so the above is quite possibly just shifting the processing work from the App to the OS.

    Where can I read more about Qt Aliens? It would be interesting the compare one top-level widget + Aliens and multiple widgets.

  9. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by fatjuicymole View Post
    Well, it takes a certain amount of processor power to process a message, so the more messages you process per second, the more processor power required for that application?
    How much processing is there really? How expensive is generation of such message? Why don't MFC based apps get those messages or do they?

    I can write an application that shows a popup (hint) when the mouse hovers over a control. Such an application can process zero messages to do that, as the OS will highlight the button and then show the hint/popup after a delay. The app only gets a message if the button is actually clicked.
    I'm sure you can do that with Qt as well. I assume disabling hover events would do the trick.
    Sure, the app could ask for mousemove messages whilst over that control, but there is no need if the OS will do the work you want anyway.
    But the button will not be highlighted when you hover the cursor over it unless the application does get a message about it.

    Where can I read more about Qt Aliens? It would be interesting the compare one top-level widget + Aliens and multiple widgets.
    On Qt Labs and possibly on Qt Quarterly. Directing your web search engine to Qt+Alien+Windows should do the trick. You can disable Aliens by setting an evironment variable before running an application so you may compare both approaches without even compiling anything. Just set this in your environment: QT_USE_NATIVE_WINDOWS=1
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by wysota View Post
    But the button will not be highlighted when you hover the cursor over it unless the application does get a message about it.
    On Qt, yes, but if you use native OS widgets the OS can take that duty away from you. So the button could be highlighted without the app getting a single message. Admittingly its just moving the processing elsewhere.

    Some of the OS widgets I do feel are more efficient than Qt widgets however (for example, a QTableView or QTreeView with several million items where the native widget takes 9% to keep updated, whilst Qt takes 30%+). This is typically because the Qt variant is far more complex and flexible. I've no doubt a cut-down widget could be done in Qt that can rival the more simple native OS widgets.

    Thanks for the link. I now understand what Qt aliens are, why we have them and why they are useful.

    QT_USE_NATIVE_WINDOWS=1 certainly seems to work, but I can't help but think it's not really native - it seems to use different windows for each widget, but doesn't use any of the widgets built into the OS. This is acceptable and expected, as the Qt versions have lots more functionality than the native widgets.

  11. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by fatjuicymole View Post
    On Qt, yes, but if you use native OS widgets the OS can take that duty away from you.
    But processing still takes place. It doesn't matter (like you said before) if it is the OS responsibility or the application's. And Qt uses native rendering on recent Windows platforms so I'm assuming that happens the same way as for MFC apps (if they conform to the style at all).

    Some of the OS widgets I do feel are more efficient than Qt widgets however (for example, a QTableView or QTreeView with several million items where the native widget takes 9% to keep updated, whilst Qt takes 30%+). This is typically because the Qt variant is far more complex and flexible.
    Yes, the last part is the thing that makes a difference

    QT_USE_NATIVE_WINDOWS=1 certainly seems to work, but I can't help but think it's not really native - it seems to use different windows for each widget,
    But that's what is called native.
    but doesn't use any of the widgets built into the OS.
    No, that wouldn't make sense as APIs are not compatible. But you can use native controls in Qt apps if you want. Of course your software will stop being portable...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by wysota View Post
    But you can use native controls in Qt apps if you want. Of course your software will stop being portable...
    Hmmm, I have the choice of using powerful open source portable widgets or closed source proprietary widgets. I know which I'm going to continue using

  13. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    But you have a choice Many people don't have that choice.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. #12
    Join Date
    Nov 2009
    Location
    Novosibirsk, Russia
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt weak points and disadvantages?

    Thanks for this discussion )
    I just would like to comment some points:

    0) I think, when we discuss Qt disadvantages, we have to remember about C++ disadvantages too. There are such projects as QtJambi and PyQt, but still most people use C++ for writing Qt based applications. This is important point if we compare Qt with Java or .NET

    1) The amount of disk space required for compilation could be critical aspect. We use a single server for unit-testing and night builds with several virtual machines. We had to improve our hardware significantly to handle such builds. Also the compilation time is larger comparing to pure C++ (moc, uic takes it's time), though I don't have any numbers.

    And, yes, Qt is growing. It's becoming really huge, but it's not becoming "clumsy". I suppose that as long as Qt is flexible, easy to use and to understand, the size of the library won't cause many problems.

  15. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by kokonech View Post
    0) I think, when we discuss Qt disadvantages, we have to remember about C++ disadvantages too. There are such projects as QtJambi and PyQt, but still most people use C++ for writing Qt based applications. This is important point if we compare Qt with Java or .NET
    In my opinion you can't compare Qt to pure Java simply because of the reason you already mentioned - there is a C++ layer beneath Qt so if you compared languages, you'd have to compare Java to C++, not to Qt.

    1) The amount of disk space required for compilation could be critical aspect. We use a single server for unit-testing and night builds with several virtual machines. We had to improve our hardware significantly to handle such builds.
    Do you build Qt on those machines every night? Because the space consumption would be significant only in that case.

    Also the compilation time is larger comparing to pure C++ (moc, uic takes it's time), though I don't have any numbers.
    I wouldn't agree here. If you want to compare compilation time to pure C++, you'd have to take into consideration also compilation time for code you would have to write (in the "pure C++" version) to implement functionality provided by Qt that doesn't exist in ANSI C++.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  16. #14
    Join Date
    Nov 2009
    Location
    Novosibirsk, Russia
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by wysota View Post
    Do you build Qt on those machines every night? Because the space consumption would be significant only in that case.
    We don't build Qt every night, but we have "pre-commit builds" of our project. Sometimes there could be several simultaneous builds, which requires large amount of disk space.
    Quote Originally Posted by wysota View Post
    I wouldn't agree here. If you want to compare compilation time to pure C++, you'd have to take into consideration also compilation time for code you would have to write (in the "pure C++" version) to implement functionality provided by Qt that doesn't exist in ANSI C++.
    That's a good point

  17. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt weak points and disadvantages?

    Quote Originally Posted by kokonech View Post
    We don't build Qt every night, but we have "pre-commit builds" of our project. Sometimes there could be several simultaneous builds, which requires large amount of disk space.
    So size of Qt is irrelevant in this case.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.