Results 1 to 4 of 4

Thread: how to rewrite QStyle

  1. #1
    Join Date
    Jun 2008
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default how to rewrite QStyle

    1,what is different between drawPrimitive and drawControl ,and how to use?
    2,what is different between polish(QApplication ) ,polish(QWidget *) and polish(QPalette ),
    and how to use?
    3,which is better ,QStyle or StyleSheet?

  2. #2
    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: how to rewrite QStyle

    Read the fine manual: QStyle
    J-P Nurmi

  3. #3
    Join Date
    Jun 2008
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to rewrite QStyle

    thanks at first ,i have read the doc several times ,
    QPushButton for examples
    int drawControl can use CE_PushButton to control it
    as well in drawPrimitvie can use PE_PanelButtonCommand change it
    what is different between ?

    when i rewrite the polish use QApplication ,QWidget and QPalette ,they look like all the same , is nothing diff along them?

  4. #4
    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: how to rewrite QStyle

    The difference between polishing a widget and polishing the application is the same as setting a style on a widget and setting it on an application.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Custom QStyle: change only tool button text color
    By Lykurg in forum Qt Programming
    Replies: 0
    Last Post: 27th February 2009, 19:55
  2. name of current QStyle
    By darksaga in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2007, 20:02
  3. QStyle for TabWidget/HeaderView
    By VireX in forum Qt Programming
    Replies: 12
    Last Post: 11th June 2007, 20:18
  4. Fonts, Colors, and QStyle
    By Jimmy2775 in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2006, 07:26
  5. QStyle not styling
    By irudkin in forum Qt Programming
    Replies: 0
    Last Post: 25th April 2006, 10:52

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.