PDA

View Full Version : Signal problem in Qline Edit



awalesminfo
3rd April 2006, 09:47
hi guys am new to qt and facing problem in signal handling with Qline Edit CLASS

connect(Ok,SIGNAL(clicked()),UserName,SLOT( clear()));

this works but if i want to accept user name from UserName lineedit box then what can i do so that i will get the text user typed in UserName lineedit box :( :(

jpn
3rd April 2006, 10:13
Why do you clear the line edit straight when ok button is clicked?
Maybe you should create a custom slot, which first checks the content of the line edit

From docs (http://doc.trolltech.com/3.3/qlineedit.html#text):
QString QLineEdit::text () const
Returns the line edit's text. See the "text" property for details.
and then clears the line edit afterwards.