Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. PlaceHolder in ComboBox

PlaceHolder in ComboBox

Scheduled Pinned Locked Moved Solved QML and Qt Quick
comboboxplaceholder
2 Posts 1 Posters 1.5k 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
    gabor53
    wrote on last edited by
    #1

    Hi,
    Is there an easy way to add placeholder text to a ComboBox?
    I am sure it has to do something with the index, but I was unable to figure out how to do it.
    Thank you for your help.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gabor53
      wrote on last edited by
      #2

      I figured it out:

      displayText: currentIndex === -1 ? "Choose ..." : currentIndex
      
      1 Reply Last reply
      1

      • Login

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