Results 1 to 4 of 4

Thread: QCombobox QStyle question

  1. #1
    Join Date
    Nov 2008
    Posts
    178
    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,537
    Thanks
    13
    Thanked 1,576 Times in 1,505 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
    178
    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,366
    Thanks
    36
    Thanked 1,537 Times in 1,488 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, 10:32
  2. QComboBox roles question
    By mentalmushroom in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2012, 22:04
  3. Replies: 2
    Last Post: 14th July 2011, 12:28
  4. QStyle's question
    By aoo7wangyan in forum Qt Programming
    Replies: 1
    Last Post: 15th July 2009, 09:42
  5. Basic question on QComboBox
    By Raccoon29 in forum Newbie
    Replies: 2
    Last Post: 9th May 2008, 16: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.