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. Howto implement the QML "Search Box Example" in the Widget world

Howto implement the QML "Search Box Example" in the Widget world

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 5.0k 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
    scarleton
    wrote on last edited by
    #1

    I would like to create a search control in the Widget world similar to the QML "Search Box Example":http://doc.qt.nokia.com/4.7/declarative-ui-components-searchbox.html. Are there any examples out there?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chuck Gao
      wrote on last edited by
      #2

      I don't know if there is some example of "Search Box". But, for UI, you can see QLineEdit with QCompleter. And the logic part, it's depend on what platform you're working with. :)

      Chuck

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

        Didn't know about the QCompleter, thanks for enlightening me!

        What I am trying to do is the exact opposite of what QCompleter does... How the Search Box Example works is when there is nothing typed in, there is grayed text with instructions on what to type in the box, as soon as the user types something, the grayed text is gone and only returns if the user deletes everything they typed.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Chuck Gao
          wrote on last edited by
          #4

          Yes, you can use setPlaceholderText() function in QLineEdit :)

          Chuck

          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