Це відео не доступне.
Перепрошуємо.
PyQT5 Designer Drag and Drop GUI - PyQt5 GUI Thursdays #6
Вставка
- Опубліковано 17 сер 2024
- In this video I'll show you how to install and use the PyQT5 Designer to make Drag And Drop GUI's for Python.
The PyQT5 Designer is a really cool tool that let's you build out your GUI for your app with Python by simply dragging and dropping elements onto the screen. In this video I'll show you how to install it, open it, and create a basic app with it.
We'll then take the .ui file that designer generates, and convert it into a python file that we can then modify to make it do different things.
pyuic5 -x designer_file.ui -o designer_file_converted.py
Timecodes
0:00 - Introduction
1:27 - Install PyQT5 Designer
2:24 - Open The PyQt5 Designer
4:00 - PyQt5 Designer Overview
4:50 - Using The PyQt5 Designer
6:57 - Convert PyQt5 Designer .UI File To Python
10:00 - Create Button Press_it() Function
11:28 - Conclusion
▶️ Watch Entire PyQt5 GUI Thursdays Playlist ✅ Subscribe To My UA-cam Channel:
bit.ly/3sHT8dc bit.ly/2IGzvOR
▶️ See More At: ✅ Join My Facebook Group:
Codemy.com bit.ly/2GFmOBz
▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
▶️ Get The Code:
bit.ly/394NQ3R
Thanks for this. I had installed Qt _Creator_ (on Mac) weeks ago and gave up on it. But after watching your video, I was able to load *Designer* with "open -a Designer" within the virtual environment. Cheers.
Glad I could help!
Looking forward to more Designer videos!
Me too!
When you said smash the like button below at the end, I went to like the video but I forgot I already smashed the like button at the beginning.
Ha!
Great job, great python tutorials, great lessons
FEED that algorithm if you want more like this guys. Theres not any other ppl on youtube doing this so well
Thank you thank you!
True
BTW, you're my Programming STARRRR
Good vid btw!
Hey thanks!
this is an outstanding series! Thanks!
Glad you like it!
Thanks for all the help! Awesome stuff!
Thanks for watching!
Nice tutorials, thanks for doing the work and sharing....
Glad you enjoyed it!
At 10:53, you can probably omit the lambda function if you pass a reference to the “press it” function rather than call it. In other words, clicked=self.press_it instead of clicked=lambda: self.press_it()
yeah
if you want to pass some parameters then?
This actually helped me from getting an error to it actually working
That is a great improvement over what I've seen elsewhere but do you have to do it like that? Could you not simply write a function and put the call to the function in the button through the properties window? I'm coming from a Visual Basic/Visual Foxpro background and I find doing it that way much cleaner rather than routing around in the code. Perhaps your black background made it seem more like routing.
So basically, Python and this GUI maker are two separate utilities that in themselves, are far worst than using Visual Basic 4 from 20+ years ago!
Python code is about the same as VBScript. But the language does not have an IDE GUI designer. VB gave you an IDE and a GUI. And when you clicked a button (or any other element), it opened the code block directly for you to type in your code for the click event. Amazing! We have gone from good to terrible in 20+ years with VB to python, respectively!
Lol...no, you're incorrect. Keep watching the playlist. lol
Awesome Video Brother, love from india :)
Thanks a lot!
You have amazing teaching skills.
Thanks!
Thanks a lots. It's really hard to program in pyqt5. This is very easy!!!
You didn't mention it, but I'm assuming once you generate the .py file from the .ui file AND that you have modified the .py file, you cannot generate that .ui file again? Othewise, it would over write your manual changes you've made to the .py file?
You can always save it as a different file name.
That is correct. And that is why you should not modify that generated file. I see it a lot in tutorials and in production it's a nightmare. In fact, I never even look at the generated file I just import that into another Python file and use it. Alan D. Moore did an excellent video on why you should not modify the generated python file.
By the way, you dont need to convert the UI file to python code. You can import it, converting it might be a little easier for beginners though.
Yeah
Excellent and very well organised video for a somebody who's just starting with Qt.
Thanks
I learned a lot of facts from your videos. Great job.😃❤🔥
I'm so glad!
THANKS MAN YOU ARE REALLY THE BEST !!!
Thanks!
Ayyy! This worked! Thanks!
Welcome!
Thanks for your videos sir from Uzbekistan
Thanks for watching!
@@Codemycom I'm learning English now because I always speaking Uzbek language
But I didn't stop learning English.If I spoke wrong I'm sorry
coming from VS why does designing a gui need to be so complicated in python
I came from VS and don't see this as particularly more complicated...
Thanks Your Really Help Full :D
Glad I could help!
Outstanding video. is it possible to do the opposite? i mean from .py to. ui?
If you do everything in the py file, you don't need a UI
Good morning!
Great video, but why don't you use the loadUi function instead of converting the UI file into a Python file?
Thank you and keep up the good work.
I do later in the playlist.
pip install PyDt5Designer doesn't work (anymore?) what could be the reason for this. the error message
ERROR: Could not find a version that satisfies the requirement PyQt5Designer (from versions: none)
ERROR: No matching distribution found for PyQt5Designer
who can help me?
On linux I did it:
$ pip install pyqt5-tools
then
$ qt5-tools designer
Good job, Itamar. It worked for me.
How do I save the changes made in the .py file?
what do you mean? Just save the file...
@Codemy.com yes but it doesn't change the .ui file. I figured it out though.
I need some help with this. Im not sure why but anytime I try to run designer.exe it gives me a error window titled "Fatal Error in Launch" and inside the window says "stderr duplication failed" I cant find anything through google or duck duck go
I found a solution, I can search "designer" in my windows search bar and run it that way and it works
@@chandlerr8988 Thank you for your comment! It helped!!!
mine is not working, i reinstalled checked the path and i get an error when testing designer.exe, that the command couldn`t be found or is wrong, any help?
Hey, Great Video.
I just have a question, the ---> QPushButton(self.central, clicked = lambda: …) Doesn't work
is there another way to make the button react on click?
Why wouldn't it work?
What would cause an app designed in QT when it runs the app would just loose its' input form , button stylings etc when the app is minimized or idling? when the py script is examined, all the css stylings in there looks perfect, but the app just looses its soul so to speak after few seconds of running.
I have an assignment from the company where I work to create a GUI software using pyqt5 for the purpose of simplifying data input. if i just use python pyqt5 library without changing the pyqt5 library. is it still free?
I'm not a lawyer...but probably.
Boom!🔥❤️❤️
:-p
It looks nice in the Designer, but when I converted it to .py, it looked horrible. It does not seem to figure out that I have a 4k monitor (thought it is the same monitor I ran Designer with). I tried to resize the window, which it does, but it does not resize the widgets to match.
Come to think of it, that was why I gave up on Qt some years ago.
Any suggestions?
No, I'm sure it looks fine. Your monitor settings are just super advanced.
After watching this, I'm wondering how to alter the code to show the textbox value on a label. There's no click event involved, but only updating a textbox. Is this possible?
Yeah, you could use the keyboard key press event. Off hand I don't remember what that is but you can do it
Awesome
Thanks
does anyone have it opened and have all the panels be huge? I opened my PyQt5 designer and everything was big. The size of the fonts were huge, the panels were cluttering the screen and I am not enjoying it. Does anyone know how to make the fonts and the panels of the designer smaller?
Thanks
my designer.exe isn't opening do you have an idea of what the problem could be
You're probably using different tools than I am
Hello! I'm trying to convert ui to py, but I'm getting the following error: pyuic5 command not found.
I'm using windows.
You may not have added python to path when you installed it...you might have to reinstall python
I have this error when I try to run the python file: "Import 'PyQt5' could not be resolved" what should I do?
You didn't install Pyqt5 correctly. Try it again
Try initiating a virtual environment on your project directory first and then install pyqt5 or any other library/module/framework you need
@@sk.tawsif That's the only way to do it correctly.
Which operating system is better programming for you
I use Windows
Can you please say how this compares to Tkinter? Which is better for creating a windows DB GUI application.
You'll have to just watch my videos and see how they compare
thank you for this video, but i would like to ask a question i need to add a video in Qt designer but i don`t know how! can you explain it please!
Might do a video on that
Thanks for the class, please every time that I convert the ui into python I lost everything. Please how to change Ui and convert the file without lost my old changes. Thanks
rename the old one first, or name the new one something else so it doesn't overwrite it when you convert it
John brother Do you know how to add loading screen pyqt5 form?is there useful link for me about it!!!
I have no link to share on that
Thank You
Sure thing
Hi..how do i put value from pymodbusTCP to text or label in pyQT5?
In the same way you put anything in a text label
Nice
thanks!
I need a code If I make a change to the entry box on tkinter, it should save it and show it when I open the app again
This is not a video on tkinter...but just the tkinter playlist. I have lots of videos that do that sort of thin.
Is there anything different between 5 and 6 that is now out?
I haven't really looked at 6 yet....
waiting for this to work designer of pyqt5 tnx
Sure thing
everytime i change on Qt design and then i have to change it to python file. but i want to change screen on qt design and change the code on bycharm at the same time how can i do that. i saw bython and bycharm are hard to use. every program i do, i need to send it to my friend but all thing with bython is only the code and it can't make a program like normal.
You can't do that.
@@Codemycom so that's the problem of bython and bycharm like i did :D
@@latochannel Its python and pycharm, not bython and bycharm, and I'm not sure what you're asking...
@@Codemycom forget that, i have a idea "you can translate main.ui to main.py in the tab 1 and tab 2 on pycharm, you can make code of python and connect to tab1 so that's easy to look the code of python. how do you think :D"
@@latochannel Sorry, I have no idea what you're talking about...but give it a try and see.
Is this Walter White ???😀😀
Ha
Hey John,
I am not able to install PyQt5Designer on my mac. This is the error:
ERROR: Could not find a version that satisfies the requirement PyQt5Designer
ERROR: No matching distribution found for PyQt5Designer
pip freeze:
Command==0.1.0
PyQt5==5.15.3
PyQt5-Qt==5.15.2
PyQt5-sip==12.8.1
PLease help me sir, I would really love to go through this video.
You may need QT first: www.qt.io/download-open-source (click the 'download the binaries' link towards the bottom of the screen). Then launch QT Creator..then open a new file and select qt designer form....it's complicated I may do a video on it.
@@Codemycom Thanks Joh, I'm working on it.
I have this error when I try to run it"'Import "PyQt5" could not be resolved." What should I do?
THANKS
Welcome!
How do this works if you want to make modifications in your GUI ? let say I want to add a button. Now I need to redo the "compiling " process. Once I do that I guess I'm loosing all the code I wrote initially?
yep, I'd compile it under a different name so as not to override your original code. Then copy/paste.
@@Codemycom Thanks for you quick response. I see... it don't seems like a very robust workflow. the chances that you will miss a copy paste or place it in a wrong spot is not small. Is there a different GUI drag and drop platform that know to adapt the code when adding new features without the need to redo all the code again?
@@tas3159 No.
@@Codemycom Got you. Thanks for the content.
Please tell how to convert .UI file into .py file in pycharm
I have installed and created a ui file already just please tell How to convert it .
@@anjuchoudhary2860 No Sorry, I don't think people should use pyCharm.
May I use it with PyCharm?
If you have to ask...then I'd suggest no.
It's ok.I am learning this course using pycharm under anaconda3 environment.But of course,it took quiet long time to get everything right.
Sir I'm working on mini project , but I want solution , to save data in treeview to database ...I'm working tkinter
Yes, that's possible.
Sir could u please provide the code for it
@@prasadsapkal1191 The link to the code is, as always, in the pinned comment.
Can you help me for learning programming! I need help@I am interested in creating more GUI applications using python
Watch my videos
Unfortunately there is no wheel for linux, you have to download and install the files yourself.
Yeah, welcome to linux :-p
What is your level of programming? and what programming language expert are you? Can we have a meeting with you on Zoom? Every programmer needs experience anyway and do you want to share your experience with me?
I've been programming since I was seven years old. Sorry, I don't do zoom meetings.
Wow I’ve only just discovered this. Seems a bit easier than Tkinter as it more drag and drop. Are there any drawbacks of this over Tkinter?
I want to create a scheduler and be able to print/export the schedules. I had originally designed the schedules in Excel (pre learning python) and I could easily transfer the data to the designated areas on the schedule. Is there a way to design a template in python and be able to copy the data to it, on the click of a button in either Tkinter or Pyqt5?
Drawbacks? You can't really compare apples to oranges. Sure you can connect any python script in any framework to excel. I have a course on openpyxl.
@@Codemycom that’s brilliant thank you. For someone starting out in Python like me, it’s difficult to fully understand what each of these do, where they can overlap with each other or where some are more specific for a certain task. It’s a bit tricky trying to understand each one.
Is there a central resource that details each module/program available and what it does?
@@Paul-ly1pw No.. you just have to learn them. Maybe you can read their wikipedia pages and get a general sense.
Please John brother make many videos on Pyqt5
Every Thursday
yo Mr.White
yo
Oh Yahhh
:-)
Would you travel to Uzbekistan if you could?
Sure
Do you know country Uzbekistan? this question for John Elder
Of course
what editor are you using? how do i do it?
Sublime text and git bash terminal...you do it exactly like I do in the video.
I wanted to go to America to study and work in programming if I could
Nice
My dude looks like Walter white.
Haha
@@Codemycom LMFAO from breaking bad. Idk if you know
@@varunchauhan5971 yeah you're probably the 9,000th person to mention it to me :-p
Can u do tkinter designer ? Too
No, there isn't such a thing
John brother!! Make a video for winreg library in python please it was necessary for me to create GUI apps
Sorry, don't know that
Please output videos on PyQt5 quickly and more
I do them once a week on Thursdays
How old are you?
Can I have a personal chat with John Elder
You're chatting with me right now here
Sorry if I took your time
I'm Uzbek
I know, you told me already several times
SECOND
nice
First
Woohoo!
I am 14 years old
Awesome
Hu 😤😤😤
hi
@@Codemycom my slow network 😤😤😤😤😤😤😤
PyQt5 Designer seems better than wxGlade. wxGlade requires using layouts. PyQt5 Designer does not.
Never heard of wxGlade
@@Codemycom wxGlade is GUI designer program for the wxWidgets framework. It is not very good. Every time I go to use it I always discover a bug with it. What is worse is the developer for the program will not allow absolute positioning meaning you always have to use a layout manager - making things harder for the user.
@@a4e69636b lol seems like garbage, why would you use it? lol
@@Codemycom LOL, great comment. It was my only choice when I used the wxWidgets framework.
@@a4e69636b lol ah