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 with clearEditText ()

QCombobox with clearEditText ()

Scheduled Pinned Locked Moved Solved General and Desktop
qcomboboxclearedittext
3 Posts 2 Posters 1.0k Views
  • 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
    gabor53
    wrote on last edited by
    #1

    Hi,

    I have editable combo boxes and I wanted to leave the edit clear when the combo box loads.

    Material_Combo->setEditable (true);
    Material_Combo->clearEditText ();
    

    Why does clearEditText() do nothing? (The combo box still lists the first item in the edit.)
    Thank you.

    1 Reply Last reply
    0
    • E Offline
      E Offline
      elveatles
      wrote on last edited by
      #2

      I tried and this worked for me. Is it possible you're calling clearEditText before your items have been added?

      G 1 Reply Last reply
      3
      • E elveatles

        I tried and this worked for me. Is it possible you're calling clearEditText before your items have been added?

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

        @elveatles
        Thank you. You were right.

        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