Results 1 to 20 of 54

Thread: Still need help: Best way to have application "skins"?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Still need help: Best way to have application "skins"?

    Quote Originally Posted by codeslicer View Post
    Any chance I could create some for(int i=0; i<childWidgets().length(); i++) loop? Note that childWidgets() may not be an actual property, but for the sake of this question...
    Do you mean something like:
    Qt Code:
    1. QPushButton* button = findChild<QPushButton*>("myButtonWithCertainObjectName");
    2. if (button) // just to assure it was found
    3. button->doSomething();
    4.  
    5. // or
    6.  
    7. QList<QPushButton*> allButtons = findChildren<QPushButton*>();
    8. foreach (QPushButton* button, allButtons)
    9. button->doSomething();
    To copy to clipboard, switch view to plain text mode 

    Also, where would I put the connect()'s? In each of the plainUi and fancyUi functions, or in the constructor?
    The whole GUI, including all widgets, gets re-created when you call respective setupUi(). So you must re-establish all signal-slot connections every time the "mode" is changed.
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    codeslicer (24th February 2008)

Similar Threads

  1. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  2. Application deployment problem
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 13th April 2007, 00:11
  3. Replies: 3
    Last Post: 8th December 2006, 18:51
  4. Replies: 3
    Last Post: 31st March 2006, 18:38

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
  •  
Qt is a trademark of The Qt Company.