Results 1 to 4 of 4

Thread: QCombobox QStyle question

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QCombobox QStyle question

    All,

    Is there a link to a functioning example replacing QComboBox assets via QStyle? I see much mention, but not much code. Not really interested in a hand-draw-everything approach as was done in the Qt4 book. Interested in replacing the image assets as I already have pre-loaded pixmaps.

    Thanks,
    Roland

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QCombobox QStyle question

    By "assets" I assume you mean the one and only drop down button.

    Customizing QComboBox and the Qt Style Sheets Reference

  3. #3
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QCombobox QStyle question

    Thanks for the reply. Style sheets cannot be used as they are exponentially slower than compiled code. By "assets" I mean the border, line edit background, scrollbar, item list background, selected item background, etc.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QCombobox QStyle question

    You probably need to create a proxy style that diverts the requests that you have pixmaps for.

    Cheers,
    _

Similar Threads

  1. question on the QComboBox
    By xiongxiongchuan in forum Qt Programming
    Replies: 3
    Last Post: 6th February 2014, 11:32
  2. QComboBox roles question
    By mentalmushroom in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2012, 23:04
  3. Replies: 2
    Last Post: 14th July 2011, 13:28
  4. QStyle's question
    By aoo7wangyan in forum Qt Programming
    Replies: 1
    Last Post: 15th July 2009, 10:42
  5. Basic question on QComboBox
    By Raccoon29 in forum Newbie
    Replies: 2
    Last Post: 9th May 2008, 17:41

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.