1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include "window.hpp" #include <QApplication> void force_trackmouse_settings(); void window::closeEvent(QCloseEvent* e) { e->accept(); QApplication::exit(0); } window::window() : QMainWindow() { ui.setupUi(this); setAttribute(Qt::WA_QuitOnClose); force_trackmouse_settings(); show(); }