I have installed open source qt creator (free version) and creating very simple desktop application. I am able to create simple window but when I am running I am getting following error:
I have tried to follow this page but could not understand to fix this issue
https://www.qt.io/blog/qt-for-python-6.1
Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out.
No instance of QPyDesignerCustomWidgetCollection was found.
Python File
# This Python file uses the following encoding: utf-8
import os
from pathlib import Path
import sys
from PySide6.QtWidgets import QApplication, QMainWindow
from PySide6.QtCore import QFile
from PySide6.QtUiTools import QUiLoader
class test(QMainWindow):
def __init__(self):
super(test, self).__init__()
self.load_ui()
def load_ui(self):
loader = QUiLoader()
path = os.fspath(Path(__file__).resolve().parent / "form.ui")
ui_file = QFile(path)
ui_file.open(QFile.ReadOnly)
loader.load(ui_file, self)
ui_file.close()
if __name__ == "__main__":
app = QApplication([])
widget = test()
widget.show()
sys.exit(app.exec_())
adding xml
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>test3</class>
<widget class="QMainWindow" name="test3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1332</width>
<height>702</height>
</rect>
</property>
<property name="windowTitle">
<string>test3</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QCheckBox" name="checkBox">
<property name="geometry">
<rect>
<x>300</x>
<y>240</y>
<width>70</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1332</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionOpen"/>
<addaction name="actionsave"/>
</widget>
<widget class="QMenu" name="menuEdit">
<property name="title">
<string>Edit</string>
</property>
</widget>
<widget class="QMenu" name="menuArchive_and_update_indicator">
<property name="title">
<string>Archive and update indicator</string>
</property>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuArchive_and_update_indicator"/>
</widget>
<action name="actionOpen">
<property name="text">
<string>Open</string>
</property>
</action>
<action name="actionsave">
<property name="text">
<string>Save</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>