I am working with QT Creator. I have a form that contains a push button and an Line Edit. I would like to print a string that i give programatically in this LineEdit.Secondly I would also like to the from the LineBox a string t开发者_JS百科hat I fill in and print it using QMessageBox.
How to do it? Need some help. I don't know how to access the displayText() to write and read from a LineEdit.
I would like to specify that I put the push button and the lineedit on the Form using drag and drop.
I am working in c++ under Ubuntu Appreciate.
You use QLineEdit::setText()
to change the text and QLineEdit::text()
to read.
Your questions are very basic and show a clear lack of studying the documentation and experimenting thing yourself. Qt is one of the better documented frameworks out there and with lots of examples. Please take your time to go through them.
精彩评论