Results 1 to 2 of 2

Thread: how to get the color of dialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2006
    Posts
    34
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default how to get the color of dialog

    background.png
    How to get the color of the window and set it in the edit part of the list view, I tried hardcoring It works for only motif style not for plastique,

    QPalette listPalette= list->palette();

    listPalette.setColor(QPalette::Base,QColor(Qt::lig htGray));
    list->setPalette(listPalette);

    Can some body explain how to get the color of the dialog/window?
    Boss

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: how to get the color of dialog

    Qt Code:
    1. QPalette listPalette( list->palette() );
    2. listPalette.setColor( QPalette::Base, listPalette.color( QPalette::Window ) );
    3. list->setPalette( listPalette );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 3
    Last Post: 23rd July 2006, 19:02
  2. Show/hide part of dialog with resizing.
    By Spockmeat in forum Qt Tools
    Replies: 6
    Last Post: 7th June 2006, 09:22
  3. Replies: 3
    Last Post: 31st March 2006, 19:38
  4. Dialog positioning in GNOME
    By simk in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2006, 10:41
  5. Shape-changing dialog with qt4.1
    By moe in forum Qt Tools
    Replies: 3
    Last Post: 2nd February 2006, 11:12

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.