I believe another way around would be hijacking close event, add this ti header file:
Qt Code:
private:To copy to clipboard, switch view to plain text mode
and this to cpp file:
Qt Code:
{ cout << "Here in close" << endl; event->ignore(); }To copy to clipboard, switch view to plain text mode
More info? https://doc.qt.io/qt-5/qwidget.html#closeEvent
Bookmarks