A basic PySide6 and Qt Designer tutorial.
HTML-код
- Опубликовано: 24 янв 2023
- In this video I walk you through the basics of PySide6 and Qt Designer. We'll design some simple windows and forms and hook them together.
Qt for Python documentation.
doc.qt.io/qtforpython/index.html
Excellent book on Qt for Python (PySide6)
www.amazon.com/Create-Applica... Наука
About the 5th or more times thought with your video ( and a few of your others ), that I first spotted about 2 weeks back when I thought that Qt was worth a look. Only thing was I could'nt write a line of python code let alone use or know anything about Qt, and Pycharm was a jumble. Just to say that due to this vid I now have Pycharm running ( almost like yours with all the External tool menus you have including PyInstaller ), and now have an application I wrote in another language a few years ago now cloned as 'proof of concept' to perfection using Pyside6, I want to thank you so much for your smooth precise pace of your videos. My only issues now as you will understand as with any language/IDE in getting to know/understand and decipher the Qt library docs, that is now the biggest issue, but time and practice is the only cure for that. Thank you so much again for your time and patience which without I would'nt have done this, Qdos to you sir, will keep an eye on you video list.
BEST.TUTORIAL.EVER!
I started getting into Python a month ago. Before that a handcore Java programmer. A very frustrating journey, as I only found snippets of disconnected information on the web and youtube, regarding Python GUI development. I could not find a structured tutorial that gives a clear overview of the various development environments, the libraries and how it all fits together. Until this one. Great job! Thank you for your contribution.
👍
Believe me they are not easy to find. I went though the same thing about 4 years ago. Now I will say there are some good books on the subject, but tutorial videos are very lacking. If you don't mind me asking why did you get into Python as a Java dev?
This is the very best tutorial on PySide6 on the internet. Thank you for making this!
Thank you so much, Jason, for this video. I was designing UIs using Python, but this approach is much better and faster. The code organization is excellent. I'm now using external tools, and the workflow is incredibly smooth. Thanks again!
Amazingly good tutorial. Great project to show the use of QT, very clear explanations and reasoning and a really good tempo. You can easily break it up in smaller chunks and still follow along. Great!
I would worship the ground you walk on if I could. I have been trying to understand signals ( especially custom ones ) for almost a month now. Please please please, if you could find the time Jason, teach us more! Your method of teaching and showing possible mistakes is godlike.
I have a video on my channel on signals and slots.
yes thank you I found it :D been crawling over your channel content ever since I watched this one@@josys363
Great tutorial!
I was confused about GUI with Python, and this video helped me a lot❤
Once again thank you. Vastly better than the other tutorials.
Glad I could help.
Great tutorial. Not only the basics, but the 'best practices' writing QT apps.
Thank you so much. From the very begining it was clear you are the best!!!
Well I'm sure far from the best, but I'm glad you liked it.
Nice start. I don't know anything about PySide6 but your video is a very good introduction. I'm using pycharm too and I appreciate your setup indications. +10
Sir, I was clueless to move forward with Python in GUI format, but your guidance popped up in right time. Now I can explore further. Thank you so much. The book is also a good guidance for learner.
A small Query : If you could show us some light on QT with Python on an IClone 8 (3D animation) environment as well. Thanks again.
Thanks for producing this video demonstration. I learned how to organize my code and a 'workflow'. I'll be checking you other videos because this one was so good. Thankyou.
Thank you so much. Exactly what I needed to know, workflow and connecting things up
Brilliant. Much appreciated. I would like to see a full [complex] application course on this and would be quite prepared to pay for it. There are no doubt many others of the same mind, so please consider it. Thank you. 👍
⭐⭐⭐⭐⭐ Outstanding tutorial!
Thank you for taking the time to do this.
Thanks for an extremely helpful tutorial
Excellent tutorial!
A well delivered tutorial... No better way to start GUI development in python.
thanks .. appreciate it. Need more tutorial to design modern gui.
great tutorial
Great tutorial! Thanks!
You're welcome!
If you wouldnt mind, Jason, could you provide us with those arguments for the external tools?
GREAT Tutorial.. Sometimes I need one of those Lightbulb videos to fully understand a new python tool and this did it. I have been so far this week been converting my alittle scripts/apps that used SimpleGUI . Pyside6 is sooooooooooooooo easy so far to understand.
Request!
One thing I am struggling with is more complex front ends. How about a video on front end where you have several labels/inputs/buttons
All you would need to do is add on to what is already here. Just add more labels, buttons, and then connect them to slot methods.
thanks for the tutorial! i have a question. I have tried to look in the documentation about licenses and my doubt is that if I can use qt designer and pyside both with lpgl license
I'm not totally sure what your question is, but I would direct all questions about Qt licensing to Qt themselves.
Good job!
Thanks!
I still have a issue with bigger app and one main window which would cose main class huge. For example pycharm window UI. Is it possible to extract every menu to other class and other things on screen to other class and then embed everything in one supervisor class with just functionality of show and hide different thing and keep them organised.
BTW. Super usefull video with excellent explanation. Thanks!
The amount of effort involved in what you want to do would make it not worth it. A simple rule to follow is if you are creating a new main window, a new dialog, or a new QWidget, then that is a new class, and all code would go in that class. Keep things simple.
This was quite a good and informative video. It covered a good ground of basic to intermediate things, thanks for that. Even though I did use PyQt in my Open Source Project (CocktailBerry) for some years now, there are a few things which I might use now because did not know them up till now!
Excellent video, although I've coded a couple of small PyQT apps I have learned a lot from this. Love the idea of QT tools for uic etc and have copied that. Love the idea of the iqi shortcut (and I'd do one for the Main with Application loop too amongst other things) but not sure where to set this up in Pycharm - I assume it's a macro?
You define the custom actions under Setting, Tools, and then External tools.
@@josys363 Thanks Jason - yes I understood that bit and had no problem replicating your very useful QT external tools (so much easier than opening a Pycharm Terminal to invoke pyside6-uic for example). The bit I couldn't figure out was how you managed to 'alias' "iqi" to provide all 3 QT import lines. I can imagine such 'aliases' might be very useful for all sorts of common use code snippets (e.g. if __name__ == "__main__" ... "app.exec()" for a basic QT exec template).
Under settings look for Live Templates. You can add new templates under the Python section.
I have problems with qt designer, using W11, when I open the design layout to edit grafically the window, it crashes and closes itself. I've already tried using older versions of qt creator, if anyone knows how to solve it
Being able to compile ui files just with a right click converted me to VScode.
Hiho, this is the best Qt related tutorial for Python I've seen so far - Thank you!
I have a question though:
You've put your Icons_rc,py in the folder "Sample_Application". I tried the same, but then python spits out the error: "ModuleNotFoundError: No module named 'Icons_rc'".
When I put the "Icons_rc,py" in the same folder as the logic file, for example "add_person,py", then it works. But that means I have to duplicate the "Icons_rc,py" files each time I want to create anything new with the Qt Designer.
I guess with a larger project and bigger and more Icons this would quickly become very bloated and difficult to manage.
Do you have an idea of what I have to change to make it work as shown in your tutorial?
btw: I replaced the "." in the file naming with a "," - otherwise RUclips would immediately delete my comment.
I was having the same issue. resolved it by creating in the root dir a file named '.env' with the following text. PYTHONPATH=./..;./../icons;
So I had
Parent
-----App1
------ui
----icons
----App2
and so on.
I had same issue. I had to add icons folder to python path and everything worked. Example command:
export PYTHONPATH="${PYTHONPATH}:/home/user/Projects/your-project/icons" # icons is the name of the icons folder
Love ❤❤
Sorry can you please help me? How do you change the colour of the titlebar?
can you give me the external tool scrip,ik what to write in the argument and the working dir but not in the program
To convert a UI file to python the command is, pyside6-uic To open designer the command is pyside6-designer, to convert a RSC to python the command is pyside6-rcc
By the way, when you open Designer, go to Form, then View Python Code, and you won't have to deal with the terminal much.
If you execute another eventloop how do you pass information from one window to another?
I don't know why you would start another event loop, but to pass data from one window to another you use signals and slots. I have a whole video on them.
Took me a while to realize need to use pyside6.rcc instead of pyside6.uic command to turn .qrc file into .py----(pyside6-rcc icons.qrc -o icons_rc.py)
Thank you for such a fully explained tutorial.
Glad it was helpful!
I am confused on selecting pyQt6 or Pyside6. I am new and search engine gives me diff on license. I plan to release my s/w as open source without sharing code. which one suffice ?
Open source means you are sharing code. If you are not sharing code it's closed source. If you use PySide you only have to purchase a license from one place. If you go with PyQt the situation is different.
@@josys363 Jason. Thanks for reply. I am releasing software as commercial purpose without releasing code. Which is preferred. From above reply I understood that pySide is not free to use for distribution. Please suggest which is recommended
I cannot suggest which license you choose. The advantage that PySide has is that you only have to purchase a license from one place, which is Qt.
@@josys363 thanks Jason for your reply. Between content was too good. I have enjoyed and learnt lot from this video.
If i use pyside6 with qtcreator, does it still LGPL or GPL?
I believe LGPL
HOw come your QT designer has QT Icons on in its tool bar and if so How can I add those Myself? If you dont mind explaining please
For me they have always been there by default.
I spoke too soon! Apparently in the newest versions of Qt they have removed them from the toolbar, but you can add them back in again by going to View / Toolbar / Edit Toolbar.
So Sorry to keep on asking questions.. Ive followed your steps for the QT shortcuts and they do not work any suggestions I am using the most recent Pycharm
what ide are you using ??
@@alvinkangiri7397 PyCharm Professional
@@josys363 Thanks 👍👍👍👍
is there a difference in features between QT Creator and Designer?
Tons yes. Designer is used to create interfaces, Creator is a full IDE. Normally used for C++ development.
It was one the best tutorials I've seen in my life thank u so much for this course 🤍
Glad it was helpful!