Results 1 to 8 of 8

Thread: QT4 vs QT2: hardware requirements

  1. #1
    Join Date
    May 2010
    Posts
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default QT4 vs QT2: hardware requirements

    Hello,

    Developing a rather simple QT-4-based (tried QT 4.3.3 and 4.6.2) application, which targets to be run on a rather modern processor module, I've discovered that my application processes the setPalette()/show()/hide() methods in QPushButton slots with valueable delays.

    I've attached the application code to this message: app.qt4.tar..bz2. In two words:

    - the application draws several buttons, which text colors have to be changed if a button pressed. To change the color I connect my object's slots to the QPushButton signals, and change the button's palette with QPushButton::setPalette() in the slot function when a signal (e.g., pressed()) is emitted (when user press the button). And here I observe the delay of ~500 msec before the pressed button changes its text color!

    - another thing the application does is displaying the picture (like splash-screen) if the special button pressed, and hiding the picture if the user then clicks on it. The application prepares the appropriate objects (QLabel with setPixmap() and transparent QPushButton) in my class's constructor, and then just show()/hide() the appropriate items. And here I observe the delay of up to 1 second (!) before the picture is shown/hidden after I press the appropriate button.

    The h/w board I use has the following features:

    - EP9315 CPU (ARM920T core), 200MHz, 16KB caches;
    - SDRAM 64MB, 100MHz;
    - LCD 800x600, 16bpp;
    - touch-screen (tslib-1.0);
    - running with Linux kernel 2.6.20.21.

    When I run the application described (appropriately modified) on the same h/w board, but with the QT-2.3.10 library - everything works just perfectly, without any perceptible delays!

    Though the QT-2.3.10 library I use is patched with the Cirrus Logic patches available here.

    So I do:

    to run my QT-2-based application: $ export QWS_DISPLAY=EP93xx:/dev/fb0
    to run my QT-4-based application: $ export QWS_DISPLAY=linuxfb:/dev/fb0

    I'm not sure that these Cirrus's patches may speed-up things (probably, because I'm not a QT expert ? ), but I guess that the 'driver', which is implemented in these patches, just provides a 'link' for QT-2 to the standard linux frame-buffer interface lacked in QT-2 and presented in QT-4.

    Am I mistaken here? If not, then what could be the reasons of the described delays in case of using QT-4 instead QT-2? Is there any chance, that the appropriate implementations of QT classes, which I use, require much more CPU computation power in case of QT-4 rather than in case of QT-2? Are there any documents, which describe the "hardware minimals" required for different stable versions of QT or its features?

    Thanks in advance for the comments,
    Yuri

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

    Default Re: QT4 vs QT2: hardware requirements

    Qt4 is of course much more complex than Qt2 but simply measuring the delay between pushing the button and seeing the result doesn't say anything about what is causing the delay. It might be either modifying the palette and all things that happen around it or the process of displaying the changes. Maybe you are using some suboptimal display driver? Try running qws with directfb instead of linuxfb and see if it changes anything.

    http://doc.trolltech.com/latest/qt-e...-directfb.html
    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.


  3. #3
    Join Date
    May 2010
    Posts
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QT4 vs QT2: hardware requirements

    Hi, Wysota!

    Thanks for your point, this definitely makes sense. I'll try my application with directfb (I guess, I should at least rebuild QT with the appropriate support for this; and there is no need in a special kernel driver, since the DirectFb lib is based on the standard linux framebuffer driver for my platform), and then post here the results.

    P.S. Any other comments on this topic are welcomed as well : ) actually, there are some improvements supposed to be done to this dummy application, e.g. drawing graphics; so it could be very interesting to know about the h/w requirements for different QT libs to make the optimal choice of the h/w platform for the project.

    Regards, Yuri
    Last edited by Yuri T; 14th May 2010 at 23:30.

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

    Default Re: QT4 vs QT2: hardware requirements

    Actually the only hardware requirement for Qt is that the processor supports some atomic operations. The rest is just a matter of how fast or slow will the applications be.
    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. #5
    Join Date
    May 2010
    Posts
    3
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QT4 vs QT2: hardware requirements

    It turns out that the following patch to the original code in the start message of this topic fixes the problem of delays:

    --- a/main.cpp 2010-05-18 00:16:58.341568500 +0400
    +++ b/main.cpp 2010-05-18 00:16:27.147619000 +0400
    @@ -1,4 +1,5 @@
    #include <QApplication>
    +#include <QStyleFactory>

    #include "ui_but.h"
    #include "main.h"
    @@ -115,6 +116,8 @@ MyWidget::MyWidget(QMainWindow *w)
    */
    int main(void)
    {
    + QApplication::setStyle(QStyleFactory::create("Wind ows"));
    +
    char *argv[] = {"but.qt4", "-qws"};
    int argc = sizeof(argv)/sizeof(argv[0]);
    QApplication app(argc, argv);

    Now the QT-4-based application works as quickly as the QT-2-based one: the text color of the buttons pressed are changed without any delays, and there are no delays when I draw my full-screen picture, and redraw the main screen with buttons when the picture is pressed. I guess that the origin of the delays observed with the default Plastique style - is the gradient color of button backgrounds.

  6. #6
    Join Date
    Oct 2016
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Android

    Default Re: QT4 vs QT2: hardware requirements

    You use has the following features:

    - EP9315 CPU (ARM920T SOM Linux), 200MHz, 16KB caches;
    - SDRAM 64MB, 100MHz;
    - LCD 800x600, 16bpp;
    - touch-screen (tslib-1.0);
    - running with Linux kernel 2.6.20.21.

    Qt4 is of course much more complex than Qt2 but simply measuring the delay between pushing the button and seeing the result doesn't say anything about what is causing the delay. It might be either modifying the palette and all things that happen around it or the process of displaying the changes

  7. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QT4 vs QT2: hardware requirements

    @alexpaul: Please don't go around digging up long-dead posts and replying to them, especially if you aren't really adding anything new.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  8. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT4 vs QT2: hardware requirements

    Quote Originally Posted by d_stranz View Post
    @alexpaul: Please don't go around digging up long-dead posts and replying to them, especially if you aren't really adding anything new.
    In this case clearly spam, the link is not at all to the module the text claims to be.
    I moderated the post.

    Cheers,
    _

Similar Threads

  1. Qt for X11 requirements..
    By ML in forum Installation and Deployment
    Replies: 2
    Last Post: 18th February 2010, 00:37
  2. qt4.4 pc specs requirements or qt3 support issue?
    By triperzonak in forum Installation and Deployment
    Replies: 0
    Last Post: 9th August 2008, 02:40
  3. Readonly Model implementation requirements for QComboBox
    By DeepDiver in forum Qt Programming
    Replies: 6
    Last Post: 8th November 2007, 17:10
  4. Memory Requirements of Qt
    By Svaths in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 31st March 2007, 00:33
  5. Minimum requirements for application
    By b1 in forum Qt Programming
    Replies: 8
    Last Post: 17th September 2006, 23:29

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.