Dear all
How can I write keys that has been pressed to a QLineEdit with plus in between so that I will use them as a shortcut
Dear all
How can I write keys that has been pressed to a QLineEdit with plus in between so that I will use them as a shortcut
how about having a look at designer (its sources, rather)? one of the benefits of open source...
Please verify for me: Key press, insert "+", short cut??? Don't understand...
I was not able to find it on the designer codes
Since neither you nor my crystal ball explains the question to my I just talk in the wind: Subclass QLineEdit use the key press event filter and check for QKeySequence or any other shortcut and emit a signal or call a function. Or use textChanged ( const QString & text ) and check if there is a + and then do what ever you want.
Is there any example that could help me?
I would like to chacht which key hes been presses on a qlineedit and write it to the line itself.
any body can help me for thiss???
install event filter on your line edit and process QKeyEvent.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
or subclass QLineEdit and then:
Qt Code:
{ if (Qt::Key_Plus == e->key()) qDebug("+ was pressed I ignore that") else }To copy to clipboard, switch view to plain text mode
Bookmarks