I really hope someone can help me out on this one.
Im trying to get started with using pyqt5
, and have pretty much copied this code from a course that i am taking. the code seems to execute without any problems, but the window that i should be seeing is simply not appearing, what am I doing wrong?
Im working on ubuntu 18
by the way
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class Page(QWidget):
def __init__(self, parent=None):
super(Page, self).__init__(parent)
my_label = QLabel("This is my labet")
layout = QVBoxLayout()
layout.addWidget(my_label)
mainLayout = QGridLayout()
mainLayout.addLayout(layout, 0, 1)
self.setLayout(mainLayout)
self.setWindowTitle("my first Qt app")
if __name__ == "__mongo__":
import sys
print("LOEREE")
app = QApplication(sys.argv)
window = Page()
window.show()