"""Entry point for the Qt6 GUI application."""
from PySide6.QtWidgets import QApplication
from yast3.core.i18n import init_i18n
from yast3.qt6.main_window import MainWindow
def main() -> int:
# Initialize internationalization
init_i18n()
app = QApplication.instance() or QApplication([])
app.setApplicationName("YaST3")
app.setDesktopFileName("yast3-qt6")
window = MainWindow()
window.show()
return app.exec()
if __name__ == "__main__":
raise SystemExit(main())
28 June 2026
id 24766519That method only exists on QGuiApplication iirc
the method does exist and code run with no problem. only IDE complains about types.
Anton YablokovShouldn't QApplication inherit all methods of QGuiApplication?
QApplication extends QGuiApplication extends QCoreApplication extends QObject.
This is what my IDE resolves when I do QApplication.instance():
@staticmethod
def instance() -> PySide6.QtCore.QCoreApplication | None: ...
The type checker only knows that you have a QCoreApplication
id 24766519QApplication extends QGuiApplication extends QCoreApplication extends QObject.
This is what my IDE resolves when I do QApplication.instance():
@staticmethod
def instance() -> PySide6.QtCore.QCoreApplication | None: ...
The type checker only knows that you have a QCoreApplication
you are right, i removed QApplication.instance() and now the type check error disappeared.