1

I would like to make some kind of "help" to the users in my program. There is a QLineEdit inside, and I would like to do the following: During they are typing, the program will show them the possibilities after their text (for example with a blue background) For instance: You can type in only 4 names: Anne, Peter, Matthew, Angela. When the user at "An", there will be "gela" after his text, and if he presses the Left button it will be written "Angela". Is it possible? (It would show the suggestions like when you start to typing a link in the google chrome search bar, without the dropdown list) enter image description here

Mat
  • 461
  • 4
  • 14
  • 2
    see here: http://stackoverflow.com/questions/24248606/how-to-accomplish-drop-down-word-suggestions-in-qt – Hayt Sep 08 '16 at 12:28
  • Well, I want to make it without the dropdown list, only with the highlighted suggestion, like on the picture: the guy wrote "you", and he got a suggestion "tube.com/" – Mat Sep 08 '16 at 12:32
  • In the answer is the QCompleter class mentioned. I am sure you can customize it for your desired behavior – Hayt Sep 08 '16 at 12:33
  • Yeah I just looked: it has "completion modes" so this should be to your hearts desire. – Hayt Sep 08 '16 at 12:37

1 Answers1

4

There's a helper class for that QCompleter : http://doc.qt.io/qt-5.7/qcompleter.html

Tryum
  • 660
  • 7
  • 22