Results 1 to 4 of 4

Thread: Use Style Sheets for own QWidget

  1. #1
    Join Date
    May 2009
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Use Style Sheets for own QWidget

    Hi,

    I've implemented my own widget as plugin for Qt Designer now I want to use style sheets to change the look of the whole form including my own widget.

    How do I have to change my widget to use style sheet definitions like background.

    How can I react on a style sheet change? And how do I get the global style sheet definitions within my widget?

    Thank you in advance

    Markus

    PS: I'm using Qt 4.5.1.

  2. #2
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Use Style Sheets for own QWidget

    Look in the docs, it's really well documented

  3. The following user says thank you to vieraci for this useful post:

    Lodorot (5th July 2009)

  4. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Use Style Sheets for own QWidget

    In Assistant, look for "Qt Style Sheets"

    Also you can try Style Sheet example in Qt Demo->Widgets

  5. #4
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Use Style Sheets for own QWidget

    hi,

    there is a styleSheet row at the right side of the designer for each widget. In order to change , for instance , the background just type something like the following;

    background-color: red;

Similar Threads

  1. QTabWidget transparent background problem
    By destroyar0 in forum Qt Programming
    Replies: 10
    Last Post: 25th June 2009, 13:19
  2. Replies: 6
    Last Post: 14th April 2009, 18:40
  3. Performace problem with style sheets
    By Cruz in forum Qt Programming
    Replies: 0
    Last Post: 7th February 2009, 14:20
  4. style sheets select all except something
    By codeslicer in forum Qt Programming
    Replies: 4
    Last Post: 6th March 2008, 01:21

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.