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.

Комментарии • 250

  • @nickochoa2480
    @nickochoa2480 3 года назад +21

    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.

    • @Codemycom
      @Codemycom  3 года назад +2

      You're very welcome!

  • @alicherifi9075
    @alicherifi9075 3 года назад +18

    After following all your Tkinter serie , now I'm super happy to see you starting a Pyqt one, thank you for this hard work!

  • @mejiab19
    @mejiab19 2 года назад +9

    Can someone explain to me why he uses lambda: functioncall, why not just use -> clicked= press_it()

  • @Codemycom
    @Codemycom  3 года назад

    ▶️ 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

  • @MobbyG
    @MobbyG 3 года назад +5

    I've been following the TKinter series, and now this? Awesome! Can't wait for more!

  • @ahsanyousuf9011
    @ahsanyousuf9011 3 года назад +5

    This is what we were waiting for, finally, after a long time.....

  • @learnwithnawf246
    @learnwithnawf246 3 года назад +1

    Many new series for this year!!!Thank you sir . You are the best teacher.

    • @Codemycom
      @Codemycom  3 года назад

      Hope you enjoy them!

  • @wandersonbarcelos5519
    @wandersonbarcelos5519 3 года назад +2

    3:33 - "Super easy, barely an inconvenience!" XD

  • @ritikyadav4153
    @ritikyadav4153 3 года назад +2

    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

  • @MariusDiMaio
    @MariusDiMaio 2 года назад

    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

  • @seanli75
    @seanli75 3 года назад +2

    not to mention, you can import sys and instead of the empty list in the QApplication you can put sys.argv

  • @m_abhijit_
    @m_abhijit_ 3 года назад +3

    I started this series today!

  • @black-ym5di
    @black-ym5di 3 года назад

    Wawo! Final u touch me again, i can't wait for ur Pqt5 tutorials please support it until the end..

    • @Codemycom
      @Codemycom  3 года назад

      Going to be a good one!

  • @JonnyRobinson
    @JonnyRobinson 2 года назад

    As a new person trying to use this tool, this is extremely intimidating.😫 I will do my best to see if this sticks.

  • @dhanushhv1658
    @dhanushhv1658 3 года назад +1

    Finally I got this tutorial, thank you

  • @lasindukashmira7272
    @lasindukashmira7272 3 года назад

    Nice video sir! Waiting for this.

  • @adityachoudhary4045
    @adityachoudhary4045 3 года назад +1

    Awesome tutorial🔥🔥

  • @2907Prashantyerunkar
    @2907Prashantyerunkar Год назад

    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

  • @jockfaire
    @jockfaire 2 года назад

    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?

  • @ziamalik189
    @ziamalik189 2 года назад

    Great Sir

  • @codeKeshav
    @codeKeshav 3 года назад +1

    You shooted up your channel and introducing so many courses, confused which to do first, as all of them looks interesting

    • @Codemycom
      @Codemycom  3 года назад +1

      Do them all :-p

    • @codeKeshav
      @codeKeshav 3 года назад

      @@Codemycom not possible, as I am class 12 acc to Indian Education System.

  • @pythonusersheng3370
    @pythonusersheng3370 2 года назад

    Thank you Codemy. Good job!. I am wondering why the window "hello" does not pop out. No error message. Any clue?

  • @rave4e
    @rave4e 3 года назад

    Thanks for all of your great work!
    PyQt5 is free for use? I thought it cost a lot of money to use this library

  • @ayxanxasmmmdov1438
    @ayxanxasmmmdov1438 Год назад +1

    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

    • @MartimDev
      @MartimDev Год назад +1

      Lambda should be lower case. Usually errors tell you in which line of code they occurred.

    • @flihe
      @flihe 10 месяцев назад

      @@MartimDev haha, got the same issue - thanks for the help XD

  • @mynameisgod1135
    @mynameisgod1135 3 года назад

    Good start.

  • @raingum
    @raingum 2 года назад

    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?

  • @BCmodo
    @BCmodo 3 года назад

    Finally pyqt5... Thank you

  • @suyogsubedi8584
    @suyogsubedi8584 2 года назад

    Will you make a video on QThread ?

  • @rabiumuhammedeffect423
    @rabiumuhammedeffect423 3 года назад

    Good series, THANK YOU SO MUCH

    • @Codemycom
      @Codemycom  3 года назад

      You're very welcome!

  • @asce313
    @asce313 3 года назад +1

    This is gonna be super interesting.. Also, John could you please make some more projects in Django? Thanks alot! 👍

    • @Codemycom
      @Codemycom  3 года назад +3

      Sure thing, Django is every Wednesday

  • @abdelhamid_moukrime
    @abdelhamid_moukrime 3 года назад

    Thank you sir John
    Keep up

  • @sligma200
    @sligma200 9 месяцев назад

    You are a legend!!

  • @MuhamadSurchy
    @MuhamadSurchy 3 года назад

    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.

  • @mahmoodsekandari3621
    @mahmoodsekandari3621 11 месяцев назад

    What a great course. Are the code files for each session available?

    • @Codemycom
      @Codemycom  11 месяцев назад

      Yes, as I say in the video, the code is in the pinned comment...

  • @chriskeo392
    @chriskeo392 2 года назад

    Can you use dataclasses to write these classes?

  • @somanshbudhwar
    @somanshbudhwar 3 года назад

    You're the Heisenberg of coding. Say my name....Pythonberg

  • @bmw7147
    @bmw7147 Год назад

    thank you straight to the point

  • @codingforpythoneers2074
    @codingforpythoneers2074 3 года назад

    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

  • @briangreenberg153
    @briangreenberg153 3 года назад

    Funny how quickly you learn that upper case letters in the right spot are critical.

  • @محمودعبدالرحمن-ق7ه
    @محمودعبدالرحمن-ق7ه 3 года назад +1

    what is the better , tkinter or pyqt5 !??

    • @Codemycom
      @Codemycom  3 года назад +1

      Depends on what you want to build and your level of experience

  • @sekoulbility2032
    @sekoulbility2032 2 года назад

    which environment are you using?

  • @ahmetkarakartal9563
    @ahmetkarakartal9563 8 месяцев назад

    you are my hero
    thank you

  • @jackwang1794
    @jackwang1794 2 года назад

    Think You for all this!!!
    and by the way
    can i use python 3.4 in windows xp
    sublime text 3
    for this?

  • @jeremyho4674
    @jeremyho4674 3 года назад

    I love your videos !! I really want to learn wxpython , can you teach us ??

    • @Codemycom
      @Codemycom  3 года назад +1

      It gets easier :-)

  • @dinushawww
    @dinushawww 2 года назад

    can we create responsive window using pyQt5?

  • @gnancyg4069
    @gnancyg4069 3 года назад

    How to rectify
    Attribute error:'function' object has no attribute'font' in tkinter text editor

  • @bacharobeid7430
    @bacharobeid7430 2 года назад

    Thanks alot. Is there such a course in your website?

  • @اماديرأمان-ر9ك
    @اماديرأمان-ر9ك 2 года назад

    Good job again شكرا

  • @farishuric2416
    @farishuric2416 3 года назад

    Comment for RUclips algorithm !

    • @Codemycom
      @Codemycom  3 года назад

      Thanks, appreciate it!

  • @franciscoosuna6591
    @franciscoosuna6591 2 года назад

    Why does it say online that PyQt5 is not for free?

    • @Codemycom
      @Codemycom  2 года назад

      It doesn't say that.

  • @jonsnow3513
    @jonsnow3513 3 года назад

    why is this better than kivy

    • @Codemycom
      @Codemycom  3 года назад +1

      You can't compare apples to cars

  • @adfinemrising
    @adfinemrising 2 года назад

    howd you create the squigly f.. f string

    • @Codemycom
      @Codemycom  2 года назад

      What do you mean? Just press the buttons on your keyboard.

    • @Srokaldinho
      @Srokaldinho Месяц назад

      @@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.

  • @victordvickie
    @victordvickie 3 года назад

    You really became a GUI-GUY LOL

  • @talharauf3111
    @talharauf3111 3 года назад

    Sir, PyQt5 doesn't compatible for Anaconda Spyder

    • @Codemycom
      @Codemycom  3 года назад

      I couldn't say, I don't use that.

  • @RustyTube
    @RustyTube 2 года назад

    What’s an f-string?

    • @Codemycom
      @Codemycom  2 года назад

      It's what the video shows you it is

  • @gandhimahatma7486
    @gandhimahatma7486 3 года назад

    Sir, can't I install pyqt5 on Apple m1 chip? (os: bigsur)

  • @codeKeshav
    @codeKeshav 3 года назад

    When I write it says clear is not recognised as internal or external command

    • @Codemycom
      @Codemycom  3 года назад

      when you write what?

    • @codeKeshav
      @codeKeshav 3 года назад

      @@Codemycom *clear*

    • @codeKeshav
      @codeKeshav 3 года назад

      when I wrote *source virt/Scripts/activate* then it shows *source is not recognised as internal or external command, operable program or batch file*

    • @wtfdoiputhere
      @wtfdoiputhere 3 года назад

      @@codeKeshav u on windows?

    • @codeKeshav
      @codeKeshav 3 года назад

      @@wtfdoiputhere yup, help me out

  • @sagarhm2237
    @sagarhm2237 3 года назад

    Sir we can integrated pyqt5 in kivymd

    • @Codemycom
      @Codemycom  3 года назад

      not really...why would you want to?

    • @sagarhm2237
      @sagarhm2237 3 года назад

      @@Codemycom s sir need to integrate

    • @Codemycom
      @Codemycom  3 года назад

      @@sagarhm2237 depends on how you need to integrate and to do what...but I can't help you with it.

  • @sennlich
    @sennlich Год назад

    qt designer ?

    • @Codemycom
      @Codemycom  Год назад

      yeah we get into that later in the playlist

  • @photonspawn212
    @photonspawn212 Месяц назад

    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?

    • @Codemycom
      @Codemycom  Месяц назад

      You didn't create the virtual environment first, or you created it in some other directory

  • @DIYGURUJI
    @DIYGURUJI 3 года назад

    oops for beginners please

    • @Codemycom
      @Codemycom  3 года назад

      I have some python videos on that somewhere

  • @محمودعبدالرحمن-ق7ه
    @محمودعبدالرحمن-ق7ه 3 года назад +1

    code !!

    • @Codemycom
      @Codemycom  3 года назад

      The code is where it always is...linked in the pinned comment.

  • @airlineops
    @airlineops 3 года назад

    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.

    • @Codemycom
      @Codemycom  3 года назад

      you’re on the d drive, did you install python on your c drive? that might be the problem

  • @davel9130
    @davel9130 3 года назад +4

    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

  • @SlayerWorshipper
    @SlayerWorshipper 3 года назад +2

    What about pygame =)

  • @shubhrabhadauria
    @shubhrabhadauria 14 часов назад

    running in pycharm, doesnt show any window and program is very difficult to terminate once run.

  • @hiwab41
    @hiwab41 3 года назад +2

    Whoa nice ! PyQt5 is high performance 😮

  • @luisjuarez9673
    @luisjuarez9673 8 месяцев назад

    User
    Import "PyQt5.Qt5Widgets" could not be resolved
    Solution: import PyQt5.QtWidgets as qtw
    or pip install PyQt5

  • @karthikrajamony6044
    @karthikrajamony6044 3 года назад +5

    Good series, expecting more soon

  • @magicmanj32
    @magicmanj32 6 месяцев назад

    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

    • @magicmanj32
      @magicmanj32 6 месяцев назад

      Im like new to python this week lol

  • @KaziMdTawhid
    @KaziMdTawhid 3 года назад +2

    Thanks sir

  • @am1nese
    @am1nese 7 месяцев назад

    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

    • @Codemycom
      @Codemycom  7 месяцев назад

      Sorry I don't use or recommend VS Code

  • @jeremyho4674
    @jeremyho4674 3 года назад +1

    Can I post my Pyqt5 app for free ? And how 🤔 . Pls help me 🙏 .

  • @gypsy2545
    @gypsy2545 3 года назад +2

    Glad you finally got to PyQt!

  • @leonedott
    @leonedott 2 года назад +1

    Incredibly frustrating that the name is not QtPy :(

  • @NaveenYoYoDude
    @NaveenYoYoDude 2 года назад +1

    Would have been cute if they had named the module as QtPy !! ;-)

  • @ශිෂ්යයත්වගණිතගැටලු

    Can you teach ethicak hacking with python

  • @Mythologos
    @Mythologos 2 года назад

    When I click the button I get this error message: NameError: name 'press_it' is not defined
    Anyone know what's wrong?

    • @Codemycom
      @Codemycom  2 года назад

      You didn't define press_it

  • @ramshankeryadav_0_0
    @ramshankeryadav_0_0 3 года назад

    Sir, can we print whole QFrame and comonent in it, to A4 paper?
    Is this possible?

  • @codding_edicattions__python__
    @codding_edicattions__python__ 3 месяца назад

    nice video

  • @Redwane-Music
    @Redwane-Music 3 года назад

    why running the app in visual studio closes right away, i had to add an input at the end for it to stay open

    • @Codemycom
      @Codemycom  3 года назад

      I don't use visual studio

  • @IreneTomphson
    @IreneTomphson 9 месяцев назад

    cool video)

  • @sunkbeni4161
    @sunkbeni4161 2 года назад

    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?

    • @Codemycom
      @Codemycom  2 года назад

      What does the error message say when it crashes?

    • @sunkbeni4161
      @sunkbeni4161 2 года назад

      Its like when i press the button it crashes and there is no error message

    • @Codemycom
      @Codemycom  2 года назад

      @@sunkbeni4161 There's always an error message on your terminal.

    • @sunkbeni4161
      @sunkbeni4161 2 года назад

      @@Codemycom no error, it just crashes as if I closed it.

  • @mehmetbayrakci3269
    @mehmetbayrakci3269 3 года назад

    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.

    • @adityaparkhe5121
      @adityaparkhe5121 2 года назад

      having the same problem, did you solve the problem?

  • @stevemorse5052
    @stevemorse5052 3 года назад

    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.

    • @Codemycom
      @Codemycom  3 года назад

      Because it's best practices for many important reasons. Use the same tools I use if you don't want errors.

  • @javadmahdavi1151
    @javadmahdavi1151 2 года назад +1

    your courses are incredibly useful thank you so much...

    • @Codemycom
      @Codemycom  2 года назад

      Glad you enjoy them!

  • @philipthangngat2758
    @philipthangngat2758 3 года назад +1

    Hi, thank you for these videos. Your tutoring skills are excellent!

  • @chrisray1567
    @chrisray1567 3 года назад

    When you name a variableOrFunctionLikeThis it’s called camel case, presumably because the capital letters look like humps on a camel 🐫

    • @MichaelAlcock
      @MichaelAlcock 3 года назад

      Thats correct, and snake looks like a snake doesnt_it

  • @bluefandango
    @bluefandango 3 года назад

    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?

    • @shirokuma4168
      @shirokuma4168 2 года назад

      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

  • @vikkukumar7278
    @vikkukumar7278 3 года назад

    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.

    • @Codemycom
      @Codemycom  3 года назад

      Sorry, don't know what that is

  • @haroldw2823
    @haroldw2823 3 года назад

    Hey buddy, this is pretty cool stuff.
    Great work mate, got a sub from me.

  • @whoami2389
    @whoami2389 3 года назад

    can you tell me which one is the best from tkinter and pyqt5 please be fast please please

    • @Codemycom
      @Codemycom  3 года назад

      It depends on what you're trying to make

  • @amaulearyan9912
    @amaulearyan9912 2 года назад

    When u will make video on QScrollArea ? waiting for long time

  • @learnwithnawf246
    @learnwithnawf246 3 года назад

    Will you start a series on pygame ? Please ☺️☺️

  • @farooq8fox
    @farooq8fox 3 года назад

    this is a lot like Kivy

  • @dirkbirot2155
    @dirkbirot2155 3 года назад

    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

    • @Codemycom
      @Codemycom  3 года назад

      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

    • @dirkbirot2155
      @dirkbirot2155 3 года назад

      Ok thank you

  • @Alfredornbrp
    @Alfredornbrp 2 года назад

    thank you from a person from Brazil

    • @Codemycom
      @Codemycom  2 года назад

      Thanks for watching!

  • @dogukanburak8778
    @dogukanburak8778 2 года назад

    Sir I can not Install PyQt5 on my Mac pls help me..

    • @Codemycom
      @Codemycom  2 года назад

      Yes you can, follow the doc instructions for a mac.

  • @gingerbread2005
    @gingerbread2005 3 года назад

    Going to start this series soon, how similar is it to tkinter? Loved your tkinter videos

    • @Codemycom
      @Codemycom  3 года назад

      Awesome. It's not very similar at all..

    • @gingerbread2005
      @gingerbread2005 3 года назад

      Awe that sucks, even so, cant wait to learn!

  • @stallonetht
    @stallonetht 3 года назад

    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())?

    • @Codemycom
      @Codemycom  3 года назад

      you tell me

    • @stallonetht
      @stallonetht 3 года назад

      @@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.

    • @markfields9944
      @markfields9944 2 года назад

      @@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.