Create Graphical User Interfaces With Python and PyQT5 - PyQt5 GUI Thursdays #1
HTML-код
- Опубликовано: 28 сен 2024
- In this video we're going to start to learn how to build GUI apps with PyQt5 and Python!
Every Thursday here on the Channel we'll learn more about PyQt5 by building out some cool GUI Apps.
In this video we'll start by installing PyQt5 into a virtual environment, then we'll build a basic app with a label, an entry box, and a button that asks for your name.
After you type in your name and click the button, the app will tell you hello.
Thank you for always knowing what is going through our nooby brains, what questions we have as you're going through the tutorial, and for making the explanations so clear. As someone who's took a stab at learning programming multiple times over multiple years in the past, I can say you have helped my progression the most, by far. Thanks again.
You're very welcome!
After following all your Tkinter serie , now I'm super happy to see you starting a Pyqt one, thank you for this hard work!
Enjoy!
Can someone explain to me why he uses lambda: functioncall, why not just use -> clicked= press_it()
▶️ Watch Entire PyQt5 GUI Thursdays Playlist ✅ Subscribe To My RUclips 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
I've been following the TKinter series, and now this? Awesome! Can't wait for more!
More to come!
This is what we were waiting for, finally, after a long time.....
:-)
Many new series for this year!!!Thank you sir . You are the best teacher.
Hope you enjoy them!
3:33 - "Super easy, barely an inconvenience!" XD
Yep!
Again after reading this video title I come to know that today is Thursday in his Country but in my Country today is Friday
Erath is amazing
Ha yeah
Thanks for video.. It's very good to know that Python is possible use it in all platform. In my case i use Python in Ubuntu. And some customer not need that the software has speed. This my customer are many happy
Glad it helped!
not to mention, you can import sys and instead of the empty list in the QApplication you can put sys.argv
I started this series today!
That's great
Wawo! Final u touch me again, i can't wait for ur Pqt5 tutorials please support it until the end..
Going to be a good one!
As a new person trying to use this tool, this is extremely intimidating.😫 I will do my best to see if this sticks.
Finally I got this tutorial, thank you
You're welcome
Nice video sir! Waiting for this.
:-)
Awesome tutorial🔥🔥
Thanks 🔥
how can i add or multiply the data in PYQT5 designer table widget . like we do in excel =a2*b2 or =sum(a2:b2) . i want to insert numberical value in row cell in Qtable and use it for user input and calulation
I have a dashboard form with several buttons in a Vertical Layout. In my database i have 3 types of users-Admin, Clerk and Manager. After logging in i would like to enable and disable some of the buttons on the form based on which type of user has logged in. How can i achieve this functionality in the code?
Great Sir
You shooted up your channel and introducing so many courses, confused which to do first, as all of them looks interesting
Do them all :-p
@@Codemycom not possible, as I am class 12 acc to Indian Education System.
Thank you Codemy. Good job!. I am wondering why the window "hello" does not pop out. No error message. Any clue?
Thanks for all of your great work!
PyQt5 is free for use? I thought it cost a lot of money to use this library
Yes, it's free
Hi, there is problem in qtw.QPushButton(). So, my python give me error (invalid syntax). But when I delete (clicked =Lambda : press() )from QPushButton, it don't give error
Lambda should be lower case. Usually errors tell you in which line of code they occurred.
@@MartimDev haha, got the same issue - thanks for the help XD
Good start.
Thanks!
Can we add buttons and text without layers? Is that possible ? when i try it doesn't show up in the window but is there a way to do that im courious?
Finally pyqt5... Thank you
Welcome!
Will you make a video on QThread ?
Good series, THANK YOU SO MUCH
You're very welcome!
This is gonna be super interesting.. Also, John could you please make some more projects in Django? Thanks alot! 👍
Sure thing, Django is every Wednesday
Thank you sir John
Keep up
You’re welcome
You are a legend!!
Thanks!
Huge thanks , thanks allot , wish you all the bests , keep going , go on .
John can you create a fully functional Management System Like School or Pharmacy With Pyqt5 , Please.
Again and again Thank you so much.
We'll see :-)
What a great course. Are the code files for each session available?
Yes, as I say in the video, the code is in the pinned comment...
Can you use dataclasses to write these classes?
You're the Heisenberg of coding. Say my name....Pythonberg
Ha!
thank you straight to the point
welcome
im getting an error AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QtWidgets' even only typing the import statement
this is mine
import PyQt5.QtWidgets as qtw
Funny how quickly you learn that upper case letters in the right spot are critical.
Ha, yep!
what is the better , tkinter or pyqt5 !??
Depends on what you want to build and your level of experience
which environment are you using?
venv
you are my hero
thank you
Very welcome!
Think You for all this!!!
and by the way
can i use python 3.4 in windows xp
sublime text 3
for this?
sure, why not?
I love your videos !! I really want to learn wxpython , can you teach us ??
It gets easier :-)
can we create responsive window using pyQt5?
How to rectify
Attribute error:'function' object has no attribute'font' in tkinter text editor
Thanks alot. Is there such a course in your website?
Such a course?
Good job again شكرا
Thanks
Comment for RUclips algorithm !
Thanks, appreciate it!
Why does it say online that PyQt5 is not for free?
It doesn't say that.
why is this better than kivy
You can't compare apples to cars
howd you create the squigly f.. f string
What do you mean? Just press the buttons on your keyboard.
@@Codemycom What he menat was probably that the f in the font you use looks similar to a ƒ function symbol. I faced a similar problem with lambda, mistook it for a capital L.
You really became a GUI-GUY LOL
ha looks like it
Sir, PyQt5 doesn't compatible for Anaconda Spyder
I couldn't say, I don't use that.
What’s an f-string?
It's what the video shows you it is
Sir, can't I install pyqt5 on Apple m1 chip? (os: bigsur)
why not?
When I write it says clear is not recognised as internal or external command
when you write what?
@@Codemycom *clear*
when I wrote *source virt/Scripts/activate* then it shows *source is not recognised as internal or external command, operable program or batch file*
@@codeKeshav u on windows?
@@wtfdoiputhere yup, help me out
Sir we can integrated pyqt5 in kivymd
not really...why would you want to?
@@Codemycom s sir need to integrate
@@sagarhm2237 depends on how you need to integrate and to do what...but I can't help you with it.
qt designer ?
yeah we get into that later in the playlist
I was following just fine until this:
admin@MOPAR:~/pyQt $ source virt/Scripts/activate
-bash: virt/scripts/activate: No such file or directory
(RPi3B+; Python 3.11.2)
What did I miss?
You didn't create the virtual environment first, or you created it in some other directory
oops for beginners please
I have some python videos on that somewhere
code !!
The code is where it always is...linked in the pinned comment.
Enjoying all your content but got stuck on this. When trying to create virtual environment i get this no matter which directory im in.
Unable to copy 'D:\\Programs\\Active\\venvlauncher.exe'
Unable to copy 'D:\\Programs\\Active\\venvwlauncher.exe'
Error: [WinError 2] The system cannot find the file specified
It creates the virt file but without the necessary files inside it.
you’re on the d drive, did you install python on your c drive? that might be the problem
On Mac [zsh shell, percent sign is command prompt (not typed), 'venv_tests' is the environment name]:
To create (*USE FULL PATH*):
% python3 -m venv /Users/[username]/venv_tests
To activate:
% source venv_tests/bin/activate
To deactivate:
% deactivate
What about pygame =)
Coming soon
running in pycharm, doesnt show any window and program is very difficult to terminate once run.
Whoa nice ! PyQt5 is high performance 😮
User
Import "PyQt5.Qt5Widgets" could not be resolved
Solution: import PyQt5.QtWidgets as qtw
or pip install PyQt5
Good series, expecting more soon
Hope you like it
started following you tutorials....got following error running this script.......DeprecationWarning: sipPyTypeDict() is deprecated, the extension module should use sipPyTypeDictRef() instead
mw = MainWindow()..........Im on python 3.12.2 and PyQt6 if that helps
Im like new to python this week lol
Thanks sir
Very Welcome!
can you please help me, when i activate my virtual environment on cmder and run the code from there (python name.py) it uses the libraries that are in the machine environment and everything is fine but when i run the code in vscode it uses the global libraries + i activate my virt using (.\virt\Scripts\activate.bat) because source is not a recognized in cmder + thank you for the effort you put on these aweseome videos you have been a great help
Sorry I don't use or recommend VS Code
Can I post my Pyqt5 app for free ? And how 🤔 . Pls help me 🙏 .
post it where?
Glad you finally got to PyQt!
It's pretty fun!
Incredibly frustrating that the name is not QtPy :(
lol
Would have been cute if they had named the module as QtPy !! ;-)
Ha!
Can you teach ethicak hacking with python
no
When I click the button I get this error message: NameError: name 'press_it' is not defined
Anyone know what's wrong?
You didn't define press_it
Sir, can we print whole QFrame and comonent in it, to A4 paper?
Is this possible?
nice video
Thanks
why running the app in visual studio closes right away, i had to add an input at the end for it to stay open
I don't use visual studio
cool video)
Thanks!
so for some reason when i do .text() my program crashes instead of doing what its supposed to do. i had this problem for so long and i just cant fix it or find any fixes on google. what do i do?
What does the error message say when it crashes?
Its like when i press the button it crashes and there is no error message
@@sunkbeni4161 There's always an error message on your terminal.
@@Codemycom no error, it just crashes as if I closed it.
Hello guys! I coded this tutorial in vscode. And I run code from directly .py file. It worked a few times, I saw windows a few times but however the windows doesn’t display on the screen. I don’t understand why. Does anyone help me about this problem? When I open .py file, just C:\Windows\py.exe window opening but our coded window doesn’t display.
having the same problem, did you solve the problem?
Why use a virtual environment?
I could not get it to work, and when I re-opened the project it did not find anything, and it reported an error.
My workaround was to install the PyQt5 without the VR, and it seems to work correctly.
Because it's best practices for many important reasons. Use the same tools I use if you don't want errors.
your courses are incredibly useful thank you so much...
Glad you enjoy them!
Hi, thank you for these videos. Your tutoring skills are excellent!
Thanks!
When you name a variableOrFunctionLikeThis it’s called camel case, presumably because the capital letters look like humps on a camel 🐫
Thats correct, and snake looks like a snake doesnt_it
hello quick question:
- is qt designer free of hassle? no traps? if i download it am i able to use it with no restrictions? no one knocking at my door to check if i shared my code or not?
- is it linux friendly you think?
if you wanna share the apps without sharing the source code you must pay for qt license that's what i read in qt webpage
hello, sir, I have a problem with my project i use node -editor in my project and there are nodes and I want to add an image or icon to the node.
Sorry, don't know what that is
Hey buddy, this is pretty cool stuff.
Great work mate, got a sub from me.
Thanks!
can you tell me which one is the best from tkinter and pyqt5 please be fast please please
It depends on what you're trying to make
When u will make video on QScrollArea ? waiting for long time
No plans for that
Will you start a series on pygame ? Please ☺️☺️
Yes one of these days
@@Codemycom Thank you so much
this is a lot like Kivy
Not really...
Can you tell me jf there is a good book or webside that can teach you the diffrent functions in. Vs code i am now about too try my hand at.coding indown loaded vs code amd. Lost on what too do. Insee that you have too.down load allt.off stuff. For.differet. programs but cant you doesn't vs code have everything i see most off the major programs.on the vs code sight
Sorry, I don't use vsCode or recommend it for that reason. I use sublime text and git-scm.com terminal and it couldn't be easier
Ok thank you
thank you from a person from Brazil
Thanks for watching!
Sir I can not Install PyQt5 on my Mac pls help me..
Yes you can, follow the doc instructions for a mac.
Going to start this series soon, how similar is it to tkinter? Loved your tkinter videos
Awesome. It's not very similar at all..
Awe that sucks, even so, cant wait to learn!
Does my button.clicked.connect(press_it()) do the same thing as the code used in this video
my_button = qtw.QPushButton("press me!", clicked = lambda: press_it())?
you tell me
@@Codemycom I supposed they should work the same, but the latter as demonstrated in this video does the job to call the value input from QLineEdit for me but the former simply does nothing.
@@stallonetht from what Ive read and used with in my own code lambda runs into issues with multiprocessing that ive been able to resolve with the clicked.connect method. Not really sure why all i can find about it is that it can cause issues emitting signal outside of its thread in a Qmainwindow or what ever GUI class the the click event is defined.