Howto implement the QML "Search Box Example" in the Widget world
-
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?
-
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. :)
-
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.
-
Yes, you can use setPlaceholderText() function in QLineEdit :)