Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Load .UI files in PySide
Qt 6.11 is out! See what's new in the release blog

Load .UI files in PySide

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi,

    I am new to PySide and I would like to create an application that uses .ui file for GUI.

    @
    class MyWidget(QWidget):
    def init(self, parent):
    super(QWidget, self).init(parent)
    loader = QUiLoader()
    file = QFile(":/forms/myform.ui")
    file.open(QFile.ReadOnly)
    myWidget = loader.load(file, self)
    file.close()

        layout = QVBoxLayout()
        layout.addWidget(myWidget)
        self.setLayout(layout)
    

    @

    It throws global name QUiLoader is not defined. MY QtGui, QtCore modules do not have QUiLoader attribute.

    Please share your suggestions.

    Thanks in advance,
    Haney.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved