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 problem: non-editable combobox losses focus and appears editable
Forum Updated to NodeBB v4.3 + New Features

QComboBox problem: non-editable combobox losses focus and appears editable

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.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
    SKolaMunn
    wrote on last edited by
    #1

    I have a QComboBox in a custom widget. If I drop down the combo box then click away from it, it appears "editable" (for lack of a better description, it looks like a LineEdit with an arrow button on the right) until I hover over it again (or actually select something in it), then it is redrawn properly in the Windows 7 style (like one wide button with an arrow on the right).

    Is this a QT bug or did I do something wrong in my code that I can't find?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Anticross
      wrote on last edited by
      #2

      Can you show the pece of code where you use your combo ? Do you reimplement edit method of widget class or something else ?

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

        I found a solution but I do think its a bug. When I create the combobox, I immediately call setEditable(false), even though its the default (sometimes I set default values just for readability so I know they are set or whatnot, I never thought this would be an issue). I commented out this call and the problem went away. Seems weird that that made such a big difference but the problem was appearing repeatably every single time I'd pull the box down and then click away and as soon as I removed that line, it stopped happening. I meant to repost that as the "solution" but forgot.

        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