How to submit data from line edit onReturnClicked
-
hi guys... m working on my first Qt based desktop application. m having problems submitting a form when return is cliked. Please help out with the code for it.
-
Hi and welcome to the forums.
Please show the code you currently have and what "submit" would mean in your context? -
i am currently using the qt designer i have this ui with a line edit,.. and i wanna collect the text in it when return is clicked.. :)
-
Hi
Are you using python ? or is there other reason that you use the
standalone UI designer and not the one in Creator ?
Anyway, all Widgets are handled via signals and slots.
https://doc.qt.io/qt-5/signalsandslots.html
So you could connect the QLineEdits
https://doc.qt.io/qt-5/qlineedit.html#returnPressed
to your slot to grab the text if user press the enter key and/or you would connect to the
buttons clicked()
https://doc.qt.io/qt-5/qabstractbutton.html#clicked