Тёмный

Python GUI Development With PyQt5 Introduction & Creating Window #1 

Parwiz Forogh
Подписаться 47 тыс.
Просмотров 115 тыс.
50% 1

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 97   
@zoltannovak9381
@zoltannovak9381 4 года назад
Thanks Man, for the video series. I am re-learning pyQt5 after an 3 years break. Great stuff, easy to understand, straight to the point. Much appreciated and look forward to go through the whole series.
@davidalquichire4742
@davidalquichire4742 3 года назад
Bro, thank you a lot. I finally learned PyQt5 by your videos. The best tutorial ever!
@ZeNiTh_2K
@ZeNiTh_2K 4 года назад
Thanks man for your awesome tutorials !! Love your work . keep going !
@joevinso9907
@joevinso9907 3 года назад
I LOVE YOU BRO, You just save my day!!!!
@namelessx6930
@namelessx6930 4 года назад
for the icon, the icon should be in the same folder as the .py file you are creating. if it is in a folder, the folder should also in the same path of .py file and put (QtGui.QIcon("./Foldername/image_name.png"))
@mesuttahadinleyici1169
@mesuttahadinleyici1169 3 года назад
Thanks bro you really helped me
@adimasmudi5390
@adimasmudi5390 3 года назад
Thank you, you've helped me bro
@nilupulperera
@nilupulperera 4 года назад
Very clear. Excellent introduction!
@codedocta5406
@codedocta5406 4 года назад
Hi, I'm not getting an Icon showing in the taskbar or in the window. Does it need to be a certain size or any other requirements?
@SahajOberoi
@SahajOberoi 5 лет назад
A video on threading in PyQt5 would be pretty useful if you can post it, thanks.
@justone4272
@justone4272 4 года назад
Is it not much easier to use the Qt Designer? I am using the designer since its much more easy to work with.
@ayushiyadav3991
@ayushiyadav3991 3 года назад
I have integrated the front end with a backend tool script. Now on the click of a button, say "Restart tool" I want the session to be the default one as if I have re ran the code to get the home GUI. How do I do the same?
@TheMontaseri
@TheMontaseri 4 года назад
Awesome. Thank you. Also could you add a bit of "why" vs just "how" in your lectures. For example, why does your Window class inherits from QMainWindow. Are you extending the class? Why isn't it a use-a relationship and is a has-a relationship. It seems to me that Window simply uses services of QMainWindow class and the rest of Qt classes. My example might be a bit loud (over-kill), but I was trying to clarify the question. I leave you with this ... if you ever see bunch of people hovering over something and wonder who is who....the guy that says "how" does this work, is a technician, the guy that says "why" does it work, is an engineer and the guy that says "when" would this work? is a manager.
@ParwizForogh
@ParwizForogh 4 года назад
yea thanks i will do that in the further videos , basically there three kinds of window class that you can use in pyqt5, the first one QMainWindow that is a main window that you can have menu, menubar.menu item, status bar for that, the another one is QWidget, also we have QDialog window
@ramshankeryadav_0_0
@ramshankeryadav_0_0 3 года назад
Can we print whole QFrame and component in it, to A4 paper? Is it possible?
@seulebrg
@seulebrg 5 лет назад
Hello Parwiz - Great video - curious to see how the rest of the series will be. One point that would have been helpful for me is to explain a little more why certain functions are used. self.height etc. are obvious, but why sys.exit, why sys.argv. Not sure what level of Python programmer this is aimed at but for me, I can code these up, but lack the full understanding of why we do it
@ParwizForogh
@ParwizForogh 5 лет назад
i have some explanations in the further videos
@pragyas6943
@pragyas6943 5 лет назад
Hi Parwiz, The video series is just awesome . Could you please make a quick video for Mobile application development using PyQt ?? That will be really helpful.
@ParwizForogh
@ParwizForogh 4 года назад
yea but in python we need to kivy for mobile application development
@abledsgaming8068
@abledsgaming8068 3 года назад
Can anyone tell me at line number 7, what this line of code does "super().__init__()"
@dennisasamoah2213
@dennisasamoah2213 4 года назад
great tut
@PwnUrBadCock
@PwnUrBadCock 4 года назад
Video starts at 3:22
@welcometomyhobbyworld
@welcometomyhobbyworld 3 года назад
home.png is not shown, why? :(
@arifbasri4950
@arifbasri4950 5 лет назад
Do I need to install the LGPL Qt application too? from Qt website
@mauldw9106
@mauldw9106 4 года назад
For commercial use, do you need a qt5 licence too?
@srinivasanveeraraagavan271
@srinivasanveeraraagavan271 4 года назад
The video was really good and informative. In the place where the super function is called to inherit QMainWindow, I had to call it like super(Window, self).__init__() instead of super().__init__(), because, I got a TypeError which said 'descriptor '__init__' requires a 'super' object'. I wonder why the error didn't come for you...
@welawela105
@welawela105 5 лет назад
When I Run the code nothing appears (I use the IDE spyder of Anaconda wich I can launch Qt Designer projects with). Moreover the command "sys.exit(App.exec())" freezes my prompt
@odelmehdi3086
@odelmehdi3086 5 лет назад
sys.exit(app.exec_())
@thebestnigga174
@thebestnigga174 5 лет назад
Yes parwese more vedio like this
@arifbasri4950
@arifbasri4950 5 лет назад
for LGPL license, I can only build app by direct coding but I cannot drag and drop widgets right? because that available only in commercial...
@ParwizForogh
@ParwizForogh 5 лет назад
no you can use Qt Designer for drag and drop i have a video on that
@lewis-ytbe
@lewis-ytbe 5 лет назад
Sorry for the downvote, I've changed it. Can you explain the use of "sys.argv" in App = QApplication(sys.argv) and why use the sys.exit() method for the App.exec() in sys.exit(App.exec())?
@ParwizForogh
@ParwizForogh 5 лет назад
PyQt5 application must create an application object. The sys.argv parameter is a list of arguments from a command line.Python scripts can be run from the shell. It is a way how we can control the startup of our scripts. App.exec() entering to the mainloop of the application. The event handling starts from this point. The mainloop receives events from the window system and dispatches them to the application widgets. The mainloop ends if we call the exit() method or the main widget is destroyed. The sys.exit() method ensures a clean exit. The environment will be informed how the application ended.
@thangle996
@thangle996 4 года назад
Hello, i using VS Code to run your code but have error " self.InitWindow() AttributeError: 'Window' object has no attribute 'InitWindow' ", What is my problem?
@ayedecoder5896
@ayedecoder5896 4 года назад
I had the same problem in Pycharm. It was as a result of line spacing and indentation. So, delete the line 'self.InitWindow() ' then place your cursor at the end of the line above it 'self.height = 300', hit enter twice to start a new line and type the line 'self.InitWindow() ' again. I used the autocomplete suggestion while typing it again. Hope that helps someone else who may face same problem.
@Parvej669
@Parvej669 5 лет назад
Good Job man!!!
@ParwizForogh
@ParwizForogh 5 лет назад
Thanks
@ivangonzalez4618
@ivangonzalez4618 5 лет назад
Hi, I cannot see my icon in the window, is there a suggested size for the icon ? or maybe the path, I have my icon file(.png) in the same path of my .py file. Do you know what could be the problem ?
@ParwizForogh
@ParwizForogh 5 лет назад
there is no suggested icon, check your path and icon name maybe the problem will be there
@oliverhu3367
@oliverhu3367 5 лет назад
I tried to use a png file instead of a jpeg file and the problem is solved
@jeanmartialgillette7172
@jeanmartialgillette7172 4 года назад
Good afternoon... Can anyone please, tell me how to move a frameless QMainWindow ? Or how build a dragabble frameless qmainwindow?
@ParwizForogh
@ParwizForogh 4 года назад
i have a video on frameless window
@UsamaKhan-br7yi
@UsamaKhan-br7yi 4 года назад
I have an error in this line App = QApplication(sys.argv) showing that sys is undefined
@itisakash
@itisakash 4 года назад
You need to import sys like import sys
@dbudnymt
@dbudnymt 4 года назад
Why does this error happen? File "/home/uname/Documents/Projects/Python/QT5_Learning/main.py", line 24 sys.exit(App.exec()) ^ SyntaxError: invalid syntax [Finished in 3.6s with exit code 1] [shell_cmd: python -u "/home/uname/Documents/Projects/Python/QT5_Learning/main.py"] [dir: /home/uname/Documents/Projects/Python/QT5_Learning] [path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin] The I typed in the code and thought I might have added something but then I copied it from you blog page and sill get the same thing!
@ParwizForogh
@ParwizForogh 4 года назад
which IDE you are using the problem is that you have syntax error in sys.exit() line
@dbudnymt
@dbudnymt 4 года назад
@@ParwizForogh I'm using sublime text to write in and running from command line in Linux. Also I copied and pasted the script from your example page to eliminate any possible typing errors on my part and I still get the same error. However after reading your reply i did try it from IDLE and it worked. Also I added #!/use/bin/python3 at the top and it now works from the command line. Thanks for pointing me in the right direction.
@neouia777
@neouia777 4 года назад
Sorry but I think we use pyqt5 to create controls without programming, but I see you use code like tkinter so what is the benefice of using pyqt5🤔😶 (Sorry I am just binging) Thanks
@amine_ers
@amine_ers 4 года назад
Perfect
@jasonwell5299
@jasonwell5299 5 лет назад
Bro, I want to know which plug you use show the vertical indent line or how you setup inside in the pycharm. Help me .
@ParwizForogh
@ParwizForogh 5 лет назад
just change the them type in pycharm it will bring for you automatically
@jasonwell5299
@jasonwell5299 5 лет назад
Thank you bro. I have change the scheme into monkai not the default . After that it works.
@jasonwell5299
@jasonwell5299 5 лет назад
@@ParwizForogh I got a lot according your tutorial video even through it is the basic. If you have time that upload the pydesinger -> pyuic that's better I guess.
@deepakbhargav9633
@deepakbhargav9633 5 лет назад
Select all text and press Ctrl+alt+L
@mohsin5563
@mohsin5563 4 года назад
i'm getting this error i've installed pyqt5 through pip install pyqt5 ;( from PyQt5.QtWidgets import QMainwindow, QApplication ModuleNotFoundError: No module named 'PyQt5'
@ruslanpascoal9247
@ruslanpascoal9247 4 года назад
stackoverflow.com/questions/56726580/no-name-qapplication-in-module-pyqt5-qtwidgets-error-in-pylint
@ParwizForogh
@ParwizForogh 4 года назад
what is u r python version
@abdullahsaid8561
@abdullahsaid8561 4 года назад
@@ParwizForogh 3.8 same error
@abdullahsaid8561
@abdullahsaid8561 4 года назад
@@ruslanpascoal9247 wow. what an answer. good job making newbie confused
@alihussainfarzad9943
@alihussainfarzad9943 5 лет назад
موفق باشی رفیق راستی در ارتباط به پرداخت یوتیوب در افغانستان کمی اطلاعات میخواستم و مطمئنم که خودت بامن همکاری کرده میتوانی . میتوانی یک راه ارتباطی با خودت به من بده .
@ParwizForogh
@ParwizForogh 5 лет назад
یوتیوب در افغانستان پول ها را از طریق سویفت در اکونت بانکیت روان میکنه ، آه میتانی در فسبوکم که به همین نام است مرا ادد کنی
@tanvirhasan4912
@tanvirhasan4912 5 лет назад
Could somebody point out why the window isn't showing? import sys from PyQt5 import QtGui from PyQt5.QtWidgets import QMainWindow, QApplication class Window(QMainWindow): def __int__(self): super().__init__() self.title = "Naruto" self.top = 100 self.left = 100 self.width = 400 self.height = 300 self.InitWindow() def InitWindow(self): self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) self.show() app = QApplication(sys.argv) window = Window() sys.exit(app.exec())
@ParwizForogh
@ParwizForogh 5 лет назад
copy the code form my blog www.codeloop.org
@quamar0313
@quamar0313 5 лет назад
Please reply my output is not attractive like your's how you did that: "transparent in top"
@ParwizForogh
@ParwizForogh 5 лет назад
what is your operating system and did you copied the code from my blog www.codeloop.org
@RajGupta-sg7jn
@RajGupta-sg7jn 4 года назад
hey, thanks for the excellent tutorials, can you please help me with calling another .py files and how to add them in .exe file.
@Drqonic
@Drqonic 4 года назад
You really shouldn't turn python into EXE. If you want it to be an EXE use C++
@Drqonic
@Drqonic 4 года назад
@Edmund Keeling You know what else isn't helpful? Telling a guy how to make his file, that only works with the python runtime installed, into a larger executable which give no benefits whatsoever.
@Drqonic
@Drqonic 4 года назад
​@Edmund Keeling Actually, it is up to me. Without people like me explaining they're doing something inefficiently they'll continue to do it that way, never making good progress. Explaining to someone there is a better way to do something is way easier and beneficial than explaining how to do something ineffectively. How exactly do you think the age of information has made it this far? Because people try to help others get better, instead of stay the same. So don't come at me trying to claim what I say is irrelevant because it wasn't asked for. Nuitka and Pyinstaller are 2 easy compilers for python, and also don't bring any advantages, as a matter of fact, they bring 1 huge disadvantage, that being the file size. Pyinstaller will turn your 1 KB file into an 8 MB file, Nuitka isn't as bad, but it's still not amazing. The best you get is that people can't read your code, which let's be honest, you can easily find an exe2python file on Sourceforge. Make a difference by helping people with benefits by recommending useful stuff, if you don't have the experience to actually help, I think you sir, should shut up.
@Drqonic
@Drqonic 4 года назад
@Edmund Keeling "bragging" imagine saying I'm bragging. You specifically targeted me telling me it's NOT my job to help people grow, when in reality it is. It's every experienced programmers job to help others. That's not bragging, that's being helpful. You say I didn't need to claim you don't have experience, but if you don't like that statement, then you shouldn't of made me think it. I think I'm done here anyway.
@theoyorrau5247
@theoyorrau5247 5 лет назад
Why do you use those sys functions?
@ParwizForogh
@ParwizForogh 5 лет назад
because we need that for the window looping
@tayyabmahboob2464
@tayyabmahboob2464 5 лет назад
please do explain the code lines in detail what every line in code does.
@Alex-pf4fn
@Alex-pf4fn 5 лет назад
i don't have the home.png icon...
@ParwizForogh
@ParwizForogh 5 лет назад
you can download from iconarchieve.com
@himanshusekhar4161
@himanshusekhar4161 4 года назад
Tutorial to use QT Designer ?????????????????
@ParwizForogh
@ParwizForogh 4 года назад
check the playlist i have a video
@aawu9690
@aawu9690 4 года назад
sorry i can't understand where the 'home.jpg' is from.
@ParwizForogh
@ParwizForogh 4 года назад
the home.png is in my working directory
@mohsinbangi1361
@mohsinbangi1361 4 года назад
Do we have jobs in Tkinter , pyqt5
@jatingera924
@jatingera924 3 года назад
do u get the answer ??
@amromar4385
@amromar4385 5 лет назад
what is python version here please
@ParwizForogh
@ParwizForogh 5 лет назад
python 3.6
@deepakbhargav9633
@deepakbhargav9633 5 лет назад
QCompleter with qtextedit
@ParwizForogh
@ParwizForogh 5 лет назад
i have a video on that you can check the playlist
@cesarduarte8200
@cesarduarte8200 5 лет назад
Do a video that shows how to install python
@ParwizForogh
@ParwizForogh 5 лет назад
yea i have a video on python installation u can check python basics tutorial on my youtube channel thanks
@abdojoba8932
@abdojoba8932 5 лет назад
A video on threading in PyQt5 would be pretty useful if you can post it, thanks
@ParwizForogh
@ParwizForogh 5 лет назад
i have a video in threading
Далее
БЕРЕМЕННАЯ БЕЛКА ЗЛИТСЯ#cat
00:11
Просмотров 339 тыс.
How to Build Chatbot with Python & Rasa
2:28:05
Просмотров 52 тыс.
How I program C
2:11:32
Просмотров 742 тыс.
Beginner's Guide to the Bash Terminal
1:14:37
Просмотров 2,3 млн
Top 18 Most Useful Python Modules
10:50
Просмотров 929 тыс.
Python Top 5 GUI Frameworks
9:14
Просмотров 443 тыс.