Here is the code. import sys from PyQt6.QtWidgets import QApplication from qpageview import View app = QApplication(sys.argv) view = View() view.show() sys.exit(app.exec()) When I run it from console, I get "QWidget: Must construct a QApplication before a QWidget" error. But if I change PyQt6 to PyQt5, it works and shows the widget (qpageview is also installed and works properly). Isn't a row with QApplication enough to construct QApplication in PyQt6? Continue reading...