Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]Custom QComboBox
Forum Updated to NodeBB v4.3 + New Features

[Solved]Custom QComboBox

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sorin
    wrote on last edited by
    #1

    I want to create a widget similar with: "widget":http://img259.imageshack.us/img259/5048/comboj.jpg .Can I do it from a QComboBox? I tried to find a way to get the combo popup menu( I want to add there a QTableWidget ) but I didn't find a way. Another solution could be to use a button with an edit field. How would you implement this? Thanks!

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      You could probably try some things with a list model and muck about a bit with the decoration role to get the images. I don't think there is a nice way to create the sub-headers, except for disabled items in the list. QComboBox accepts a list model (setModel()).

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sorin
        wrote on last edited by
        #3

        Thanks for the hint, I found a nice example, look at "this":http://qtwiki.org/QCombobox_header_item if you run in the same problem.

        There are only 10 types of people in the world: Those who understand binary, and those who don't

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved