PyQt5 Tutorial - MenuBar (Shortcuts, Status Bar and Triggers)

  Рет қаралды 255,223

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 113
@fbq
@fbq 5 жыл бұрын
first Like And Comment :) xD
@hadmeinthefirsthalfngl2717
@hadmeinthefirsthalfngl2717 4 жыл бұрын
You picked the right tutorial fool!! Now all you have to do is follow the damn tutorial.
@radhikasudheer
@radhikasudheer 4 жыл бұрын
where's CJ?
@fbq
@fbq 4 жыл бұрын
@@radhikasudheer i killed 😂
@radhikasudheer
@radhikasudheer 4 жыл бұрын
@@fbq i want a no.9
@Stagedrengen
@Stagedrengen 4 жыл бұрын
I know I'm a little late to the party here, but I just wanted to let you know that you're doing God's work with these tutorials. You keep them short and simple, no mumbling or rambling, and one can easily understand what's going on. Super impressive :)
@davidgrove1600
@davidgrove1600 5 жыл бұрын
YOU ROCK! Keep going with PyQt! May offer a suggestion? Plan your UI, name every object that you want to access using code as you go along. It should be the first thing you do. However, you do not need to name items that you will not be accessing codes (ex.: labels). Maybe a suggestion for a short video?
@ruslan.zhumabai
@ruslan.zhumabai 4 жыл бұрын
You have opened my dream which I have thought for creating the App a long time ago. I just wanted to make a software which is able to connect with an Arduino board. Thank you it is so understandable. I will watch all your videos in the quarantine time. Sorry for my English if it is incorrect. I am from Kazakhstan.
@vxsniffer
@vxsniffer 4 жыл бұрын
another way to pass arguments to assigned functions (without calling them instantly) is partial function (from functools import partial) example assignment would look like: self.actionNew.triggered.connect(partial(self.clicked, ‘New was clicked’)) for this purpose both methods work the same, but some advanced cases may favour partial function... it's not redundant to lambda ;-)
@CarlosGarcia-di3kn
@CarlosGarcia-di3kn 4 жыл бұрын
I am new to python and QT designer, your video is great help. Thanks Man
@rfresh1011
@rfresh1011 3 жыл бұрын
To clarify, once you generate the .py code and you start to make manual edits to it, you cannot go back and use the QTDesigner again and re-generate the .py file because it will wipe out all of your manual changes...correct?
@brunonkowalski
@brunonkowalski 3 ай бұрын
Yes, that's why you should never edit this file.
@kristypolymath1359
@kristypolymath1359 5 жыл бұрын
I have to say that you are very well spoken, and mild-mannered. Please keep the videos coming!
@TechWithTim
@TechWithTim 5 жыл бұрын
Appreciate that!
@jimbaker3035
@jimbaker3035 4 жыл бұрын
Thanks for the tutorial. It helped A LOT. Some other QT tutorials on YT are over 5 years old and cause newbs like me major confusion. This series is very helpful.
@ashish2099
@ashish2099 2 жыл бұрын
God bless you brother. I love your tutorials so far. To think you're giving us such an amazing information for free at the expense of your own time, man you're simply amazing. Thank you brother, I'll be forever grateful
@egemenguney1715
@egemenguney1715 4 жыл бұрын
Thx for lambda explanation!
@dr4kk0nnys6
@dr4kk0nnys6 5 жыл бұрын
Bro, you always make it look easy, that's awesome
@paccooper3019
@paccooper3019 Жыл бұрын
Thank you! I always find your tutorials to be really helpful, you explain everything really good
@mayureshgawai5951
@mayureshgawai5951 4 жыл бұрын
Simple and easy to understand tutorials. Thanks Tim...
@peschebichsu
@peschebichsu 3 жыл бұрын
Love that series! Is there also an easy ways to use shortcuts without the menu bar?
@dankusanovic
@dankusanovic 4 жыл бұрын
Excellent tutorial and great explanation of the lambda function
@igorzukowicz3823
@igorzukowicz3823 2 жыл бұрын
good job Tim!! everything is clear. Thank you
@bu1491
@bu1491 5 жыл бұрын
Having dyslexia and being completely new but obsessed with all of this is overwhelming. That and being the African American athlete all my life has me completely lost with programming. You give me hope bro and the comments, but I am lost, guys. Not too many look like me and I'm far behind. But since I can't create anything yet, I write my ideas and create the prototypes on Canva because I also can't design(learning figma now). I wish there be a platform where "idea guy", "developer", "investor", "salesperson" connect as one. I'll share my ideas via email with anyone just to know if they are possible. I think they can change a lot of things in the world.
@zjason7582
@zjason7582 5 ай бұрын
Good job! Really helpful for beginners!
@alexisrdevitre
@alexisrdevitre 4 жыл бұрын
This is the 3rd video I'm watching. Great videos man, I love the effort you put into making every step clear but not overwhelming for newbies! Keep up the good work :)
@zankacode1342
@zankacode1342 5 жыл бұрын
Thanks for your time and share the knowledge
@TechWithTim
@TechWithTim 5 жыл бұрын
Np!
@maggiebiu4609
@maggiebiu4609 3 жыл бұрын
Your tutorial is so clear and so helpful!!! Thanks!!
@cptprice03
@cptprice03 5 жыл бұрын
Awesome tutorials on qt. I was struggling to understand from other people on youtube and on web and I like your approach of going from basic and building up bit by bit. Keep them coming.
@vng
@vng 4 жыл бұрын
Thank you... I finally understand lamba functions.
@wiloghby
@wiloghby 4 жыл бұрын
This guy is so freaking Canadian, it's wonderful
@thetrinitysolution9631
@thetrinitysolution9631 Жыл бұрын
Tim, your tutorial worked flawlessly on my dad's PC. But when I try to create the ".py" file using the Mac terminal, it says "Command not found." This is most likely because the path is wrong, and the ">" symbol is probably the issue. I've tried a number of substitutions without success. Would you know what the correct syntax is for the Mac or where I could go for that info? Thanks!
@a.sam.2714
@a.sam.2714 2 жыл бұрын
Very nice tutorial, thank you. But in the code you do not import created gui file from QT, but rather create everything programmatically.
@javiliyo69
@javiliyo69 4 жыл бұрын
this tutorial help me a lot! Thank you so much!
@addictivelearning6153
@addictivelearning6153 5 жыл бұрын
Hey can you upload everything about qt rapidly pls and you are making best content so keep it up
@TechWithTim
@TechWithTim 5 жыл бұрын
That’s kind of asking a lot, but I appreciate your compliment !
@fcmorena246
@fcmorena246 3 жыл бұрын
amazing Tim, you the best
@medicencatalina
@medicencatalina 4 жыл бұрын
The Best tutorials ever, keep doing it!!!
@vwarrier
@vwarrier 3 жыл бұрын
I'm (py)charmed by this tutorial
@etedali1975
@etedali1975 4 жыл бұрын
Though You keep being effective sometimes You're unpatient and immediately after having typed the last letter then jumping to the next topic. Else You're diong a great support.
@dolevdo
@dolevdo 2 жыл бұрын
Thank u so much
@马奇欣
@马奇欣 2 жыл бұрын
Hello Tim. Thanks for your nice video but I have an issues that all the Menubar do not show up. I check by preview in QtDesigner and also by running the python code. could you please help me if you see this comment
@soeasysale
@soeasysale 4 жыл бұрын
thx,tim,very helpful
@briangreenberg153
@briangreenberg153 3 жыл бұрын
Tim, I'm just now looking at this video from 2019. So I don't know if you are monitoring for questions and comments. When I create menu items, they do not show up on the mainwindow as shown in your example. Instead, they show up at the top of the "Python" program that is running the code. Not sure how to explain it more clearly without providing you with a screenshot. The only thing that comes to mind as a possible cause is I am doing all this on a Mac using the very latest OS which is Big Sur. I know you do your work on a Windows PC. I wonder if you have seen this issue before and if you know what I need to do to make the code run properly. Thanks
@TheAmazingpower
@TheAmazingpower 5 жыл бұрын
So happy to see some qt tutorials. Most of them are not that accurate or detailed. But why editing the generated ui. py file? If I will go to the creator again, and make changes there, convert it into a .py the changes made in the previous .py are gone. I usually define a class inheriting the Ui class and define all new properties there so I can change and reconvert the ui-file freely. Is there any reason not to do that?
@mohammadkarami8984
@mohammadkarami8984 4 жыл бұрын
Great Video! Thanks a lot
@billelguechi5831
@billelguechi5831 4 жыл бұрын
I am Always quite confused About where to put the Action triggerd when we press something is it in retranslateUi OR in SetupUI ??
@SkyFly19853
@SkyFly19853 5 жыл бұрын
Getting interesting more and more... 💯💯💯💯
@moc2130
@moc2130 5 жыл бұрын
Hi, what if you wanted to attach to the events outside of the class? How would we do that? How do we raise events from outside of a class? I come from a .Net background. Very similar stuff i think.
@sebastianarrieta9678
@sebastianarrieta9678 4 жыл бұрын
Tim, kinda late but what if I wanna update my design? Will I lose all the methods that I made?
@anabelsa
@anabelsa 3 жыл бұрын
Hi, Tim. When I opened my .py file in Sublime, I found that I was missing the "if" from your lines 71-78. What can I have done wrong? Thanks.
@valigeorge9110
@valigeorge9110 4 жыл бұрын
Thanks, Tim. Subscribed.
@jstro-hobbytech
@jstro-hobbytech 2 жыл бұрын
lambda is a compiler preprocessor directive isn't it?
@kayombo1001
@kayombo1001 3 жыл бұрын
Hi, how are u, thank you for sharing your knowledge, sorry how can I call a new grafic interface from another after converting it to py. Or I mean, a create an interface, I converted it from ui. file to py file, an after that I wanto to call ather interface x from interface y a created before? Sorry for my broken English, Iam typing from Angola and here we speak Portuguese, I hope you undnerstand.
@saadaor
@saadaor 3 жыл бұрын
hey, can i use qt designer for free ? i build an app with pyqt5 code ( without the qt designer) what should be the right way to enable transition between the pages? now the app crash because i create new pages in other pages. should i do "manager" page which wrap the all pages ? thanks
@chinaguy101
@chinaguy101 3 жыл бұрын
great videos
@davideettori3226
@davideettori3226 5 жыл бұрын
Amazing video
@efserevin
@efserevin 3 жыл бұрын
Hello! I want to ask something. We have a "TextLabel" text in main window and when the programme ran, only half of the text was visible. So i wrote " def update(self): self.label.adjustSize()" after " font = QtGui.QFont() font.setPointSize(36) self.label.setFont(font) self.label.setObjectName("label")" to fix this problem, but it didn't work. What should i do to fix it?
@diagotorres4094
@diagotorres4094 5 жыл бұрын
Thanks for the tutorial. My problem with this approach is that many of the pillars of what define good development are not followed here. Code readability, proper code abstraction, and code revision are non existent. By which I mean, the code generated is messy, the code generated is not defined in separate functions or classes, and any new update to the GUI would require a weird work around. Do you have any recommendations to my concerns. Thank you. Awesome tutorials.
@abhinavraj1885
@abhinavraj1885 4 жыл бұрын
The standard way to use is to import the GUI code in another python file and write the functional part there. That way when you change the GUI and regenerate code you don't lose the functionality of the app.
@sitadevimuthkhod2574
@sitadevimuthkhod2574 4 жыл бұрын
Can we pass a text file as an argument instead of string text?
@cunninghamb505
@cunninghamb505 5 жыл бұрын
This playlist is great, do you have any classes on udemy? or any other site
@TechWithTim
@TechWithTim 5 жыл бұрын
I have a teachable course! Link in description
@chococookiesyuppie5177
@chococookiesyuppie5177 4 жыл бұрын
can we just create the trigger in designer instead of coding?
@bitterbob30
@bitterbob30 3 жыл бұрын
This is a little bit easier than hand coding a GUI via Tkinter. Just a little bit. :-)
@xyaman425
@xyaman425 5 жыл бұрын
Thanks!
@plouf1969
@plouf1969 4 жыл бұрын
How do you deal with the case where you go back to QTDesigner to make further changes, and pyuic5 overwriting your tutorial4.py that you modified manually? I think you probably want the manual changes made into a separate file with a class that derives from UIMainwindow, and to which you can make manual changes without worrying about UIMainwindow being erased?
@MiskoKatua
@MiskoKatua 4 жыл бұрын
You can separate the UI file from the Python file by importing the uic module and then load your .ui file with uic.loadUi('') In the window variable you can then address the different UI Components like e.g. window.button1.clicked.connect() import sys from PyQt5 import QtWidgets, uic app = QtWidgets.QApplication(sys.argv) window = uic.loadUi('test.ui') window.show() app.exec()
@yosrjouini999
@yosrjouini999 3 жыл бұрын
Merci infiniment
@sainco3036
@sainco3036 5 жыл бұрын
thanks.
@fransflorenza9708
@fransflorenza9708 2 жыл бұрын
can anyone help me please? im kind a beginner. i want to use push button and detect whenever its have value true or false without toggled. i try to use set checkCheckable but it make the button toggled (not momentary)
@ChristopherBrown-bj4zl
@ChristopherBrown-bj4zl 4 жыл бұрын
Anyone else seeing their program crash after clicking "new"? 'UI_MainWindow' Object has no attribute 'Clicked"
@sreejasitcvellanad
@sreejasitcvellanad 4 жыл бұрын
I also gets it. Any fixes?
@sreejasitcvellanad
@sreejasitcvellanad 4 жыл бұрын
I found it instead of self.clicked(-text-) use clicked(self,-text-)
@kristypolymath1359
@kristypolymath1359 5 жыл бұрын
Why do you need the Lambda keyword? Wouldn't calling --> self.actionNew.triggered.connect( self.clicked( 'foo'))
@TechWithTim
@TechWithTim 5 жыл бұрын
Try it and see ;)
@glengub
@glengub 5 жыл бұрын
Keep it going!
@mdakash-ns7vq
@mdakash-ns7vq 4 жыл бұрын
what power Full Softwer Kivy or qt5?
@mathsplug6800
@mathsplug6800 3 жыл бұрын
Hello, when converting from .ui to .py code, then running the .py code in Jupyter notebook, the code will not run, and says "Not Responding" Why is this?
@mathsplug6800
@mathsplug6800 3 жыл бұрын
Now running the code in Sublime Text as per the video and the response is: This application failed to start because it could not find or load the Qt platform plugin "windows" in "". Available platform plugins are: minimal, offscreen, windows. Reinstalling the application may fix this problem. [Finished in 3.3s] Any help
@MediaGrizzly.
@MediaGrizzly. 3 жыл бұрын
If you click form and go down to view python code you can skip the cmd step
@zvalaz3014
@zvalaz3014 3 жыл бұрын
you rock!!
@coldblaze5698
@coldblaze5698 4 жыл бұрын
I thought it would be a PyQT 5 tutorial as it says on the title but it was more of a Qt Designer Tutorial with pyqt as a back end. :( I got confused between Menubars and Menus but i figured it out in the end after reading the API. Just got click baited I guess \O/
@surajnath4282
@surajnath4282 4 жыл бұрын
triggered.connect not working !!!!AttributeError: 'QPushButton' object has no attribute 'triggered'
@axh2
@axh2 4 жыл бұрын
QPushButton.clicked.connect... Triggered is for the Menu item only
@chopinfanclub6672
@chopinfanclub6672 5 жыл бұрын
I'm getting a TypeError too many arguments with the self.label.adjustSize
@matsolof7995
@matsolof7995 5 жыл бұрын
How to embed pyqtgraph to qtwidget? Video?
@MrDksmall
@MrDksmall 9 ай бұрын
I didn't see anything about the status bar, did I miss something?
@unknownman5296
@unknownman5296 4 жыл бұрын
if you think Tim's video is not enough try reading the documentation, it have a lot more fun stuffs in it. www.riverbankcomputing.com/static/Docs/PyQt5/index.html
@158-i6z
@158-i6z 3 жыл бұрын
Note: if you're on macOS, you will not see menubar on the actual window, but on the top of the screen instead.
@poweruser60
@poweruser60 2 жыл бұрын
Again on macOS, the status tip text is not displayed anywhere (that I've found yet)
@ilusions4
@ilusions4 Жыл бұрын
LOL! Thank you so much. I've been making a cross-platform program and this has been driving me insane for 3 days. I've never used a mac in my life (only linux and windows), so I didn't think to look there.
@atomgutan8064
@atomgutan8064 4 жыл бұрын
Why is there self before every single thing?
@sayanghosh6996
@sayanghosh6996 4 жыл бұрын
thats how OOP in python works, they pass around a reference of the object in the methods, its like 'this' in other languages
@sayanghosh6996
@sayanghosh6996 4 жыл бұрын
@Mr_Relaxing yeah thats what i said.
@Thmyris
@Thmyris 4 жыл бұрын
11:00 does anyone understand why the code errors out if you dont use "lambda:" ?
@davorm4634
@davorm4634 4 жыл бұрын
Same question here...
@jonasgames5476
@jonasgames5476 4 жыл бұрын
IDK but if you use lambda: without upper L it works for me
@KirtiDhruv
@KirtiDhruv 3 жыл бұрын
Here is the reason: The connect method requires a name of the function to connect to. If you pass clicked('xyz') ---> It means you are calling the function 'clicked' with 'xyz' as argument and the 'return value' of clicked will be passed to connect. Hence the error!
@subzero9229
@subzero9229 3 жыл бұрын
@@jonasgames5476 Thank you so much. You inadvertently helped me fix my code. self.actionNew.triggered.connect(Lambda: self.clicked("New was clicked")) was not working. However, when "Lambda" is lowercase "lambda," it works. Again, I appreciate it.
@Life-History2515
@Life-History2515 Жыл бұрын
@@jonasgames5476 THANK YOU!!
@codewithwasif3517
@codewithwasif3517 5 жыл бұрын
Finally!
@drumpf4all
@drumpf4all 5 жыл бұрын
Why would anyone do dev work in windows? Doesn’t make sense. Also, you do know windows10 spies on you. Privacy is important to me.
@TechWithTim
@TechWithTim 5 жыл бұрын
I’ve got nothing to hide!
@glengub
@glengub 5 жыл бұрын
Haha. Do you use mac or linux? What distro? I'm on w10 also i am considering to switch to linux.
@kristypolymath1359
@kristypolymath1359 5 жыл бұрын
Why would anyone do dev work in linux? Doesn't make sense. Also, do you know that IRC hates you, and Linux wants you to be unsocial? Health is important to me. :D
@drumpf4all
@drumpf4all 5 жыл бұрын
Kristy Whalen I see what you did there. Not funny. Lol.
@JosephHeady
@JosephHeady 3 жыл бұрын
@@kristypolymath1359 haha
@pythonocean7879
@pythonocean7879 5 жыл бұрын
second 💕💕
@thetech4719
@thetech4719 4 жыл бұрын
Thanks Alot
@N10-b8f
@N10-b8f 5 жыл бұрын
Thanks a lot
PyQt5 Tutorial - Images and QPixmap
6:40
Tech With Tim
Рет қаралды 168 М.
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 108 М.
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 39 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 10 МЛН
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 27 МЛН
Content & SEO: Mastering SEO and Content Marketing
6:56
ExponentialX
Рет қаралды 2
Top 18 Most Useful Python Modules
10:50
Tech With Tim
Рет қаралды 932 М.
PyQt5 Tutorial - ComboBoxes with Examples
11:45
Tech With Tim
Рет қаралды 125 М.
Python GUI Development With PySimpleGUI
15:15
Real Python
Рет қаралды 1 МЛН
How to use Qt Layouts
19:18
Velcode
Рет қаралды 95 М.
PyQt5 Tutorial - QMessageBox and Popup Windows
9:13
Tech With Tim
Рет қаралды 154 М.
PyQt5 QtDesigner Login and Signup Forms tutorial: for COMPLETE beginners
30:47
Code First with Hala
Рет қаралды 112 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 39 МЛН