Results 1 to 4 of 4

Thread: Designer form creation very slow

  1. #1
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Designer form creation very slow

    Hi,

    I'm looking for suggestions to improve performance. This is a windows app.
    This is for one dialog in particular, created by the Designer and
    shown in the attachment.
    It contains, among other things a 4 X 32 grid of dragabble LED objects whose
    base class is QLabel.

    When my app starts and a entry is clicked in the tree to the left this dialog
    is created and added to the displayable workspace. Base on what is clicked I need
    to hide or show some of the 4 X 32 dragabble LED objects.

    It is very slow under the debugger and still unacceptably slow when built as a release version.

    Under the debugger Some of the more costly functions:

    ****** Calling setupUi()
    ****** Back from setupUi() Time elapsed: ms 1372

    ****** Calling DPMConfigDevices() - Hide/Show the supported devices
    ****** Back from DPMConfigDevices() - Hide/Show the supported devices Time elapsed: ms 1432

    ****** Calling thisWidget->layout()->addWidget(m_DpmConfigTabSheet);
    ****** Back from addWidget(m_DpmConfigTabSheet) Time elapsed: ms 822

    Any suggestions?

    Thank you!

    Mark Foley
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer form creation very slow

    Well, I think you went the wrong way there...
    Qt is slow with complex layouts and a large number of widgets(let's hope that will improve with 4.4), so there's not much you can do about it.

    I would have implemented that 4x32 grid with a QGraphicsView. 128 items means nothing for a graphics view. If it is not too late to change your approach, I suggest you go ahead and do it.

  3. #3
    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: Designer form creation very slow

    I'd turn those 128 separate LED widgets into a single custom widget that draws the LEDs to avoid relayouting everything every time you change something. QTableView with a custom delegate might be a simple replacement for your LED widgets.

  4. #4
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Designer form creation very slow

    Thank you for both replies, which essentially tell me what I already feared was true. The
    design is not practical. This was my first QT complex form and I now understand quite a bit
    more.

    Thankfully it is not too late to change the design, and that is what I will do.

    Mark

Similar Threads

  1. Form resizes ok in Designer, not in my test app.
    By MrGarbage in forum Qt Tools
    Replies: 2
    Last Post: 30th August 2007, 14:30
  2. Replies: 6
    Last Post: 5th July 2007, 02:00
  3. Replies: 5
    Last Post: 10th May 2006, 00:20
  4. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42
  5. Replies: 4
    Last Post: 6th February 2006, 14:30

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.