// Only after other operation has finished we ask whether to save and close eventually if (can_close ()) { do_close (); QMainWindow::close (); emit closed (); } else { m_exited = false; } I would try to check whether the code gets to these places (1) to (4): if (can_...
#include <QtWidgets/QMainWindow> #if QT5_USING_X11 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT5_USING_X11 #include <QtX11Extras/QX11Info> #include <xcb/xproto.h> #if QT5_HAVE_XCB_ICCCM Expand All @@ -68,7 +68,7 @@ #include <cairo.h> #include <headless/svpgdi.hxx...
#include <QMainWindow> #include <Python.h> #include <iostream> #include <QDebug> QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow...
You can then import theUI_MainWindowobject, subclass using multiple inheritance from the base class you're using (e.g.QMainWIndow) and then callself.setupUI(self)to set the UI up. python importsysfromPyQt6importQtWidgetsfromMainWindowimportUi_MainWindowclassMainWindow(QtWidgets.QMainWindow, Ui_M...
(QtWidgets.QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs) self.browser = HelpVideoReplayWidget( "https://www.youtube.com/embed/YdZd7LolWm0", """width="557" height="315" frameborder="0" style="background-color: #181818"...