Results 1 to 2 of 2

Thread: Customize QPushButton and QComboBox

  1. #1
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Customize QPushButton and QComboBox

    Hi,
    I'm creating a custom style from the QWindowsStyle and I want that the look and fell of a QComboBox is the same of the QPushButton one...following the NorwegianWoodStyle example, I reimplemented the PE_PanelButtonCommand but unfortunately this new look and feel is applied only to the QPushButton. Why? I noticed that in NorwegianWoodStyle it probabily works fine because it inherits from QMotifStyle instead my custom style inherits from QWindowsStyle.

  2. #2
    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: Customize QPushButton and QComboBox

    The combobox is drawn by CC_ComboBox you in a general case you need to reimplement drawComplexControl() and handle CC_ComboBox to do what you want. It works in the norwegian wood example because motif style asks the style to draw the button panel from within handling CC_ComboBox.
    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. Same height for QComboBox and QPushButton
    By cevou in forum Qt Programming
    Replies: 5
    Last Post: 12th May 2012, 07:56
  2. Customize QDial
    By Jayes in forum Qt Programming
    Replies: 10
    Last Post: 23rd December 2010, 04:44
  3. Customize QErrorMessage
    By doberkofler in forum Qt Programming
    Replies: 1
    Last Post: 19th May 2010, 16:12
  4. Replies: 0
    Last Post: 22nd February 2010, 09:30
  5. Replies: 3
    Last Post: 26th September 2006, 12:16

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.