Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to display QPushButtons in the line edit of QComboBox



  • When the user enters text in QLineEdit, the completer should display related text and once the user selects that text, a QPushButton containing that text should display in QLineEdit of QComboBox followed by the cursor to enable entering more text. Now, if the user writes some more text and the completer displays some matching text, pressing enter it would create another QPushButton of that text next to the previous QPushButton and followed by the cursor to write more text.
    I tried to do this by setting the layout in the lineedit and adding widgets onto it and then trying to move the cursor but it didn't move.
    So, is there any way how could I achieve this functionality?Image.PNG


Log in to reply