June 1, 2011

scarleton scarleton
Lab Rat
72 posts

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 [doc.qt.nokia.com]. Are there any examples out there?

3 replies

June 1, 2011

Chuck Gao Chuck Gao
Lab Rat
329 posts

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. :)

 Signature 

Chuck

June 1, 2011

scarleton scarleton
Lab Rat
72 posts

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.

June 1, 2011

Chuck Gao Chuck Gao
Lab Rat
329 posts

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

 Signature 

Chuck

 
  ‹‹ using QLibrary to load a QWidget      Code doesnt work ››

You must log in to post a reply. Not a member yet? Register here!