When executing uic.loadUi('', self) the self object already contains all widgets you can directly call. For this example you can for instance set text directly: self.textEdit.setText('My Text') without doing .findChild() first.
Thanks for the example. However I am having a problem that I think many others are facing: When trying to import uic from PyQt5, it is not recognized. Therefore we can't go on with the uic.loadUi command. Any suggestions to solve this?
It's nice to be able to use the designer, but I could not find a way to create an executable file in pyinstaller because the UI file is required and pyinstaller is not capable of using it.
To programmatically add widgets to an existing GUI (opened via loadUi()), is using Layouts the only/preferred way? For example, my .ui doesn't already have a layout, it's just a Main Window with a QtWidget, so the following throws an error: the_layout = self.findChild(QtWidgets.QHBoxLayout, 'The_layout_name') the_layout.addWidget(stuff) can a layout itself be added to it programmatically after loadUi()? Or should a new layout be created, and the gui (loadUi()) then added to it? Can you give an example how to do that?
maybe you should consider having a script or practicing a bit more before recording. 3min of this video can be reduced if you practiced a bit more...but thanks for the video!
Oie! Plz share your code in a pastebin (pastebin.com/) and provide information on the versions you use of python and which IDE you use; this way the reason of crashing could be found. Does the application also give a certain error?
You can support me on Patreon
www.patreon.com/parwizforogh
When executing uic.loadUi('', self) the self object already contains all widgets you can directly call.
For this example you can for instance set text directly: self.textEdit.setText('My Text') without doing .findChild() first.
Nice. Please, Sir, continue this playlist. That'll be a big help for us.
very slick !! thank you for this
Thanks for the example. However I am having a problem that I think many others are facing: When trying to import uic from PyQt5, it is not recognized. Therefore we can't go on with the uic.loadUi command. Any suggestions to solve this?
same
same
very useful 👌🏼
Glad it was helpful!
It's nice to be able to use the designer, but I could not find a way to create an executable file in pyinstaller because the UI file is required and pyinstaller is not capable of using it.
To programmatically add widgets to an existing GUI (opened via loadUi()), is using Layouts the only/preferred way?
For example, my .ui doesn't already have a layout, it's just a Main Window with a QtWidget, so the following throws an error:
the_layout = self.findChild(QtWidgets.QHBoxLayout, 'The_layout_name')
the_layout.addWidget(stuff)
can a layout itself be added to it programmatically after loadUi()? Or should a new layout be created, and the gui (loadUi()) then added to it? Can you give an example how to do that?
There is no uic in PyQt5
Did you find any solution?
I am unable to import the UIC module. Is it covered in your course?
yea that is covered
How do I load UI file as subwindow??
Hello, for my "import uic", there is no refernce found and i wanted to know if someone knew how to fix that
maybe you should consider having a script or practicing a bit more before recording. 3min of this video can be reduced if you practiced a bit more...but thanks for the video!
Why my applications crashes while running CODE using python + pyqt5?
Oie!
Plz share your code in a pastebin (pastebin.com/) and provide information on the versions you use of python and which IDE you use; this way the reason of crashing could be found.
Does the application also give a certain error?
"Make it bigger"
THATS WHAT SHE SAID