Results 1 to 2 of 2

Thread: Adding popup menu to QComboBox

  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Adding popup menu to QComboBox

    I have a QComboBox that when drops down shows a large array of items. I want to make this list smaller by splitting some of the less used items into groups, and have the user open these groups by hovering over or clicking an arrow on the item.

    Has someone already developed a widget like this? If not, and you think this is an appropriate way of handling this:
    • is it possible to draw such an arrow like icon on the right part of the combobox item without overwriting the paint event?
    • Would be correct in thinking I would have to override the MouseMove and MousePress events to show the popup menu?

  2. #2
    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: Adding popup menu to QComboBox

    You can override the QComboBox::showPopup and provide your own widget which expands dynamically

Similar Threads

  1. Related to Popup of the QComboBox
    By ashishsaryar in forum Qt Programming
    Replies: 1
    Last Post: 10th July 2009, 16:29
  2. Replies: 3
    Last Post: 17th May 2009, 20:17
  3. Disable popup menu
    By febil in forum Qt Programming
    Replies: 7
    Last Post: 26th March 2009, 12:21
  4. Popup menu for a QGraphicsItem?
    By Morea in forum Qt Programming
    Replies: 4
    Last Post: 4th February 2009, 21:27
  5. multi level menu popup
    By MrGarbage in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2007, 08:06

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
  •  
Qt is a trademark of The Qt Company.