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
Forum Updated to NodeBB v4.3 + New Features

PlaceHolder in ComboBox

Scheduled Pinned Locked Moved Solved QML and Qt Quick
comboboxplaceholder
2 Posts 1 Posters 1.2k 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 6 Jul 2019, 20:28 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 7 Jul 2019, 19:21 last edited by
      #2

      I figured it out:

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

      1/2

      6 Jul 2019, 20:28

      • Login

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