Pyside2 Qt. Can not open window

-1

I am trying to learn Pyside2 with QTDesigner. I have been following the QT forums tutorials, but for some odd reason, I can not get my main window to open. Tutorial: https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html#using-ui-files

import sys 
from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtCore import QFile
from PySide2.QtUiTools import QUiLoader
from art_gallery import Ui_MainWindow

class MainWindow(QMainWindow):
    print("Begining of class")
    def __init__(self):
        print("Begining of __init__")
        super(MainWindow, self).__init__()
        print("End of suprt __init__")
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.printRecords.mouseDoubleClickEvent(self.ui.stackedWidget.setCurrentIndex(1))


print("Begin here")
window = MainWindow()
window.show()

The above code gives me the following output:

Begining of class
Begin here
Begining of __init__

Process finished with exit code -1073740791 (0xC0000409)
python
qt-designer
pyside2
mainwindow
asked on Stack Overflow May 10, 2020 by cmillones • edited May 10, 2020 by eyllanesc

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0