Results 1 to 4 of 4

Thread: Stop QDialog from inheriting parent's palette.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Default Re: Stop QDialog from inheriting parent's palette.

    Ok this is clear, you are setting some style sheet for QDialog, so every QDialog in the project will have the same style sheet.
    If you want to apply the style sheet for one particular dialog, you have to do something like this:
    Qt Code:
    1. //Lets assume your QDialog instance name is dlg.
    2. QDialog#dlg {
    3. background-color: green;
    4. }
    To copy to clipboard, switch view to plain text mode 
    This will change the style sheet of only one dialog.

    For more selectors here.

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

    Avrohom (8th September 2009)

Similar Threads

  1. Replies: 7
    Last Post: 12th January 2011, 22:01
  2. How to stop event loop of QDialog in Qt4
    By node_ex in forum Qt Programming
    Replies: 3
    Last Post: 8th July 2008, 07:19
  3. QDialog - how to stop hide on "ESC"?
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2008, 16:40

Tags for this Thread

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.