Skip to content

Instantly share code, notes, and snippets.

View gist:5198821
myTextEdit->moveCursor (QTextCursor::End);
myTextEdit->insertPlainText (myString);
myTextEdit->moveCursor (QTextCursor::End);
View wont_crash.cpp
QPushButton = *myButton;
myButton = new QPushButton ("button's text");
myGridLayout->addWidget (myButton, 0, 0, Qt::AlignLeft);
View will_crash.cpp
QPushButton = *myButton;
myGridLayout->addWidget (myButton, 0, 0, Qt::AlignLeft);
You can’t perform that action at this time.