Python Forum
How to convert abc.ui into abc.py
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to convert abc.ui into abc.py
#4
Save FirstApp.ui in folder where pyuic5.exe is placed PyQt5\Scripts folder.
Then from Scripts folder run same command.

You can also load ui file straight in,then is no need to convert.
from PyQt5 import uic, QtWidgets
import sys

class Ui(QtWidgets.QDialog):
    def __init__(self):
        super().__init__()
        uic.loadUi('FirstApp.ui', self)
        self.show()

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = Ui()
    sys.exit(app.exec_())
Reply


Messages In This Thread
How to convert abc.ui into abc.py - by rajeev1729 - Sep-05-2017, 07:48 AM
RE: How to convert abc.ui into abc.py - by Larz60+ - Sep-05-2017, 10:41 AM
RE: How to convert abc.ui into abc.py - by Litha - Sep-09-2017, 04:12 PM
RE: How to convert abc.ui into abc.py - by snippsat - Sep-09-2017, 04:37 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020