Answer the question
In order to leave comments, you need to log in
Why does a Segmentation fault occur on a form when the Enter button is pressed while entering data?
For example, there is a login password entry form. Created a slot that is called by the Submint button with the released() signal. And also this slot with QLineEdit is called by the returnPressed() signal to press the Enter button. If you just click the Submint button with the mouse, then everything is fine. And if you press Enter on LineEdit, then Segmentation Fault crashes. Who can tell why? Where is my joint?
Pseudocode:
connect(button, SIGNAL(released()), SLOT(auth())); // работает хорошо!
connect(lineEdit, SIGNAL(returnPressed(), SLOT(auth())); // вылетает SIGSEG
void auth() {
//auth code
}
0x00007ffff4b79d7e in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question