Seite 1 von 1

PyQt will nicht starten - Programmierfehler?

Verfasst: Freitag 5. Juni 2020, 14:21
von Phobit
Hallo,
ich habe hier ein simples PyQt5 Programm:

Code: Alles auswählen

import sys
from PyQt5.QtWidgets import QWidget, QApplication


class MainWindow(QWidget):

    def __init__(self):
        super().__init__()


if __name__ == '__main__':
    app = QApplication(sys.argv)
    main = MainWindow()
    main.show()
    sys.exit(app.exec_())
Wenn ich das jetzt ausführe kriege ich folgende Fehlermeldung:

Code: Alles auswählen

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Da da jetzt kein Error oder ähnliches dabeisteht, wunder ich mich jetzt ob da irgendwo in dem Programm ein Fehler ist oder eher im PyQt5... Was kann ich da machen damit mir das Fenster angezeigt wird?

Re: PyQt will nicht starten - Programmierfehler?

Verfasst: Freitag 5. Juni 2020, 15:31
von sparrow
Unter welchem Berriebsystem mit welcher Desktopumgebung willst du das denn starten?

Re: PyQt will nicht starten - Programmierfehler?

Verfasst: Samstag 6. Juni 2020, 14:56
von Phobit
Ubuntu 18.04 mit GNOME

Wenn ich mich richtig erinnere könnte es aber sogar sein dass ich hier schonmal mit QT was laufen gehabt habe... War vllt aber auch ne frühere Ubuntu Version