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. QComboBox popup disappears.
Qt 6.11 is out! See what's new in the release blog

QComboBox popup disappears.

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 666 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.
  • G Offline
    G Offline
    gozag
    wrote on last edited by
    #1

    My QComboBox popup disappears when clicking on it. To keep the popup visible I need to hold the mouse button which is not nice.
    This only happens with my QComboBox that has ~60 items but not with the one with ~10 items.

    SGaistS 1 Reply Last reply
    0
    • G Offline
      G Offline
      gozag
      wrote on last edited by
      #5

      I did an ugly hack by subclassing QComboBox. Set the QComboBox editable, no insert, and the line edit as readonly.

      1 Reply Last reply
      0
      • G gozag

        My QComboBox popup disappears when clicking on it. To keep the popup visible I need to hold the mouse button which is not nice.
        This only happens with my QComboBox that has ~60 items but not with the one with ~10 items.

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Which version of Qt ?
        On which platform ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        G 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Which version of Qt ?
          On which platform ?

          G Offline
          G Offline
          gozag
          wrote on last edited by
          #3

          @SGaist on GNU/Linux. I think it happens because the popup spawns right below the mouse cursor, because it instantly selects what is below the cursor then. Also happens in GTK.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gozag
            wrote on last edited by
            #4

            I set the application style to Windows and it works now, the combobox popup is a dropdown list now.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gozag
              wrote on last edited by
              #5

              I did an ugly hack by subclassing QComboBox. Set the QComboBox editable, no insert, and the line edit as readonly.

              1 Reply Last reply
              0
              • G gozag has marked this topic as solved on
              • G gozag has marked this topic as unsolved on
              • G gozag has marked this topic as solved on

              • Login

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