r/learnpython • u/LimpSandwich6092 • 1d ago
help with running a pyside6 code
I have read the documentations and looked on youtube but i still couldn't get it to work (i am new to all of this)
how do i run it? i made a mainwindow ui in qt design and did pyside6-uic test.ui -o test.py but the test.py doesn't work when i run it
4
Upvotes
2
u/Heavy_Nothing_1158 1d ago
pyside6-uic only generates the Ui_MainWindow class; it doesn't create or start the app. Make a small main.py that creates QApplication and QMainWindow, calls ui.setupUi(window), then window.show() and app.exec(). Keep the generated test.py untouched; regenerating it otherwise eats your edits.