PySide6 runs code without issues but nothing appears

26 views Asked by At

So, I build a code that will start my app, and when I run it, nothing appears on the screen the same as PyCharm doesn't solve any issues.

import sys
import rec_rc
from PySide6.QtWidgets import QApplication, QMainWindow
from ui_Main_Window import Ui_MainWindow

class ExpenceTracker(QMainWindow):
    def __init__(self):
        super(ExpenceTracker, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)


if __name__ == '__ExpenceTracker__':
    app = QApplication(sys.argv)
    window = ExpenceTracker()
    window.show()

If you need more information. Just write in comments.

I tried many variables of code, but in some I have issues and another gives the same result.

class ExpenceTracker(QMainWindow,Ui_MainWindow):
    def __init__(self):
        super(QMainWindow).__init__(self)
        self.ui = Ui_MainWindow()
        self.setupUi(self)



if __name__ == '__ExpenceTracker__':
    app = QApplication(sys.argv)
    window = ExpenceTracker()
    window.show()



It just the example of what I'm building.

0

There are 0 answers