Unsolved I dont know why QString from QlineEdit is not working(
-
This post is deleted! -
Run the app with debugger attached (F5) to see where it crashes.
Also, please use code tags when pasting code here, it makes it easier to read. Example:
``` void thisIsSomeCode(); ```
-
@coutKateM said in I dont know why QString from QlineEdit is not working(:
QLineEdit *myLineEdit = new QLineEdit(this);
c++ basics - this is a local variable.
-
@coutKateM said in I dont know why QString from QlineEdit is not working(:
qDebug()<<myLineEdit->displayText();
As @Christian-Ehrlicher has said. If the line above compiles (which I believe you are saying it does), it indicates that you have a member variable named
myLineEdit
ininterface.h
, but you assigned to a different variable viaQLineEdit *myLineEdit = ...
.