PyQt5 Tutorial - How to Use Qt Designer

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • This pyqt5 tutorial will show you how to use Qt Designer with python. The first steps to using QtDesigner is to download and install pyqt5-tools (this can be done through pip). Next you need to locate the designer application. This can be found in your python install locations Lib/sit-packages/pyqt5-tools folder. It is named "designer".
    Command to turn .ui to .py
    pyuic5 -x "filename".ui -o "filename".py
    Playlist: • PyQt5 Tutorial - Setup...
    Get %30 off a GitPod.io subscription with the code:TECHWITHTIM2FQBMX
    www.gitpod.io/
    ◾◾◾◾◾
    💻 Enroll in The Fundamentals of Programming w/ Python
    tech-with-tim.teachable.com/p...
    📸 Instagram: / tech_with_tim
    🌎 Website techwithtim.net
    📱 Twitter: / techwithtimm
    ⭐ Discord: / discord
    📝 LinkedIn: / tim-rusci. .
    📂 GitHub: github.com/techwithtim
    🔊 Podcast: anchor.fm/tech-with-tim
    💵 One-Time Donations: www.paypal.com/donate/?token=...
    💰 Patreon: / techwithtim
    ◾◾◾◾◾◾
    ⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
    Tags:
    - Tech With Tim
    - Python Tutorials
    - PyQt5 Tutorial
    - PyQt Designer
    - How to use pyqt designer
    #python #pyqt5 #qtdesigner

КОМЕНТАРІ • 573

  • @chriss3154
    @chriss3154 2 роки тому +359

    Using python 3.9 I found the designer.exe in site-packages -> qt5_applications -> Qt -> bin👍

  • @crimsonjester777
    @crimsonjester777 2 роки тому +8

    I've been searching for how to make my Designer work for a month: googling weird advices, reading overcomplicated articles, digging into documentation... And you has solved my problem in a half an hour. Thanks!!!

  • @markjohnson6343
    @markjohnson6343 2 роки тому +23

    Using Python 3.10.4, I found that PyQt5-tools had an error when installing. PyQt5 was fine. Nothing seemed to resolve this until I removed Python and installed 3.9.10 which allowed me to install both PyQt5 and PyQt5-tools. The Designer and pyuic5 both worked perfectly.
    Great tutorial! Thank you Tim.

    • @YacineZerimi
      @YacineZerimi 2 роки тому +1

      I'm facing the same issue with the same edition 3.10.4, downgrading to 3.9.10 thnx

    • @tommyispog8026
      @tommyispog8026 2 роки тому +2

      Thank you! You're an absolute lifesaver

    • @deiaabdullah2008
      @deiaabdullah2008 2 роки тому +1

      @@YacineZerimi that was so helpful

    • @kristijankizem6877
      @kristijankizem6877 2 роки тому +1

      @@deiaabdullah2008 I've lost 40 minutes on this problem while watching first video in the series... Thank you a lot for posting this.
      P.S. 3.9.10 isn't available any more but it works on 3.9.13 which is the last version of 3.9

    • @cnfnbcn3227
      @cnfnbcn3227 2 місяці тому

      That's because PyQt works only with Python 3.9 and lower

  • @Scanito
    @Scanito 2 роки тому +1

    Hey Tom, I recently started following your tutorial videos on PyQt5. Let me tell you: Thanks so much for the GREAT work. By far, you are the best! Keep it going.

  • @AnnoyingErrors41
    @AnnoyingErrors41 4 роки тому +345

    Just open up your console and type in "designer" after the pip installs

  • @IAmOrion
    @IAmOrion Рік тому +3

    Just started a python project that needed a GUI - having never done this much in python (I've done the odd py project and used circuitpython a fair bit but not as complex as my current project) -- this video playlist has been a godsend! Thank you so much for this pyqt5 series playlist / tutorial :)

  • @silveraqui6704
    @silveraqui6704 4 роки тому +6

    Loving this tutorial. Thanks for all the effort you put in the videos, keep going Tim, you are an awesome teacher!

  • @ashish2099
    @ashish2099 Рік тому +2

    Initially I couldn't find pyqt5-tools inside scripts. Using pycharm with virtual environment made using virtualenv, python version 3.10.5. pyqt5-tools didn't get installed in my system for some reason. So, "pip install PyQt5Designer" within the same working directory as my virtual environment worked for me. I can now use designer.exe. As always, I'm grateful to tim for his clear explainations and free tutorials. God bless you brother, keep up the good work. You're definitely making this world a better place.

  • @MrCheejiayuan
    @MrCheejiayuan 4 роки тому +1

    Thanks tim, ur series on pyqt has really helped fleshed out some major concepts i wasn't grasping!

  • @Soljarag5
    @Soljarag5 5 років тому +9

    Definitely my new favorite channel that I found.... I'm going to go through your pygame tutorial series soon

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 Рік тому +1

    thank you so much i'm at #5 of this series and it has been very simple and easy to follow and understand. :)
    really needed something like this

  • @tosinibiwoye3959
    @tosinibiwoye3959 2 роки тому

    Tim i love all your videos, always looking forward to your next videos. You are an amazing teacher!

  • @rob876
    @rob876 4 роки тому +5

    This is the tutorial I've been waiting for - in particular 9:24

  • @nishamahmed7081
    @nishamahmed7081 4 роки тому +1

    Man you are a hero. Very clear explanations. Step by step

  • @scottweiss4443
    @scottweiss4443 4 роки тому +1

    Awesome tutorial! Your videos are so easy to follow and very helpful!

  • @guireis5389
    @guireis5389 4 роки тому +34

    For those who are experiencing this error:
    "'pyuic5' is not recognized as an internal or external command,
    operable program or batch file. "
    This is because your pyuic5.exe is not in PATH. Probably your pyhton script folder is not in PATH, even though you put the option "add to Path" when you were installing Python.
    This happened to me, my Python folders are scattered around and I don't even know why. There are two methods of resolving:
    01 - (What I did) The folder he shows that has all the files that pip installed, I added to PATH. (So much so that when you install a new library, you will no longer see that warning suggesting to add it to the path as the entire folder is already there.)
    There are already tutorials on the internet, it's very simple
    02 - Instead of typing "pyuic5", you write the location where "pyuic5.exe" is. It's more complicated, but it also works.
    Like if I helped you :)

    • @alessandrorotondo1906
      @alessandrorotondo1906 2 роки тому +19

      For those who cannot still solve the problem, use:
      python -m PyQt5.uic.pyuic youruifile -o yourpyfile -x
      Thank me later :D

    • @SurajKumar-vu7ef
      @SurajKumar-vu7ef 2 роки тому +2

      @@alessandrorotondo1906 thank you so much man! Really appreciated ⚡

    • @mak448a
      @mak448a 8 місяців тому

      And for those who are using PyQT6: just write "pyuic6"

    • @aamano7439
      @aamano7439 3 місяці тому +1

      @@alessandrorotondo1906 Thanks dude! Also works for PyQt6 (replacing PyQt5 for PyQt6)

  • @othmaneomar5222
    @othmaneomar5222 3 роки тому

    vous expliquez tellement bien les choses que j ai fait le raprochement avec plein de sujet merci pour tout et bon courage .

  • @Dimlutube
    @Dimlutube 3 роки тому

    Earned my subscribe bro. I'm a big ole Windows nerd. I use hotkeys for everything, I know all of the little tricks, I customize it to hell. In short, I use Windows very efficiently.... but man, I never knew you could open a cmd prompt by typing cmd in the address bar... You added another tool to my tool belt.... Oh, and you're also very smart, you teach in an effective way, and third compliment. Thanks.

  • @GeronimOCZECH
    @GeronimOCZECH 4 роки тому

    Omg only video on youtube which actually works!!! Thank you so much

  • @zitrakzsingh7295
    @zitrakzsingh7295 4 роки тому +233

    If u cant find the designer in pyqt5-tools
    then Qt then bin folder
    If Qt folder is not shown then install "Qt for Python' extension on vscode etc

    • @silverasdf2055
      @silverasdf2055 4 роки тому +3

      Thanks so much dude!

    • @neoquam
      @neoquam 4 роки тому

      @@silverasdf2055 Awesome! Thank you :)

    • @quocbao6046
      @quocbao6046 4 роки тому +1

      @@neoquam can you please explain how to install it pls?

    • @staticintsolo1939
      @staticintsolo1939 4 роки тому

      thx

    • @zitrakzsingh7295
      @zitrakzsingh7295 4 роки тому

      @@quocbao6046 if u are using vs code then type
      pip install (your extension)

  • @wabalabavxx
    @wabalabavxx 3 роки тому +23

    8:11 TIL that you can open command prompt in a folder by typing cmd in the address bar

    • @brendan8915
      @brendan8915 3 роки тому +2

      Same. All the years Tim has taught me some incredible things, but this one I doubt even my senior software dev even knows lol. Fucking supreme stuff right there. Man.

  • @davidgrove1600
    @davidgrove1600 5 років тому

    I finally got QtDesigner installed on my Samsung Chromebook Plus v2. To start out with, I installed all of QtCreator and Qt5. I ended up with a /usr/bin/designer that didn't work. It wanted something and I couldn't figure out what
    I installed QtDesigner for Qt 4, and that one worked. I found out that /usr/bin/designer was a reference.
    I changed my .desktop file for the "Qt 4 Designer" (find | grep) to "Qt Designer" and changed its command to "designer -qt=5". This means that the Qt4 version exists, but for whatever reason the new one works because of that.
    Maybe this will help someone.
    PLEASE KEEP MAKING THESE VIDEOS! PyQt is terribly under-documented.

  • @user-cc8kb
    @user-cc8kb 3 роки тому

    Thank you very much. That's all I needed to get started :)

  • @mitchellstevens3948
    @mitchellstevens3948 5 місяців тому

    Thank you for this video. This will save me some time in designing UI's. Excellent job! 👍

  • @hlmrz
    @hlmrz 4 роки тому

    You are the man, from now on, I will subscribe to you and follow every other content that you create for us :D

    • @ibrahimheroglu
      @ibrahimheroglu 4 роки тому

      C:\Python35\python"' is not recognized as an internal or external command,
      operable program or batch file.
      Hocam bu problemi alıyorum, yardımcı olabilir misiniz?

  • @julians.2597
    @julians.2597 4 роки тому +1

    thx for this great tutorial! Really hepled me out

  • @alexa_neonova
    @alexa_neonova 4 роки тому +1

    Thank you for your video-tutorial! I'm just a newbie in programming and afraid all of these codes because I'm an digital artist, not programmer x) But your video really understandable for me! Thank you! ^^

  • @thekillerbunny
    @thekillerbunny 4 роки тому +4

    This helped me a lot to get started, however I learned later that this is not the best way to program a more complicated program, as each time you edit the GUI, you rebuild the code, and have to code everything again (or just copy and paste). I found much more efficient to create a main program that loads the .ui file that's generated. It means you can make any changes to the GUI in QTDesigner and your code will not be affected.
    I used the function loadUI for the uic package in PyQt5.
    Just in case anyone else gets stuck there! Thanks for the tutorial, it def helped me to get started!

    • @ora-ora-ora
      @ora-ora-ora 3 роки тому

      Could you elaborate please ?

  • @keshavaaumritum1
    @keshavaaumritum1 5 місяців тому

    wow, you make the best videos. Thank you again Tim.

  • @aryanagarwal2083
    @aryanagarwal2083 2 роки тому

    thanks Tim, you are great!

  • @arazguliyev9043
    @arazguliyev9043 4 роки тому

    You are best teacher that I have never seen : - )

  • @khalilselmi6056
    @khalilselmi6056 4 роки тому

    You made my day thanks brother

  • @pranavnagvekar636
    @pranavnagvekar636 4 роки тому

    thanks bro, i was finding a video that would clear my doubts, and you solved all my doubts 👍👍👍👍👍👍👍

  • @stephanosc7728
    @stephanosc7728 Рік тому

    Thanks for the videos, Tim.

  • @ronaldknerr9018
    @ronaldknerr9018 Рік тому +4

    Hey Tim. Great tutorials. I just wanted to share an update. For those looking for the Designer.exe file, mine was located in ...Lib/sitepackages/qt5_applications/Qt/bin

  • @otikamporn
    @otikamporn 2 роки тому

    Thank you. That's awesome.

  • @bu1491
    @bu1491 5 років тому +1

    I love how short and straight to the point your videos are. Question: where should I start if I'm new to all of this?

  • @rozhanhoseingholizadeh9684
    @rozhanhoseingholizadeh9684 10 місяців тому

    thank you for sharing this tutorial, it was perfect for understanding basics of QT

  • @hoholord5699
    @hoholord5699 4 роки тому

    bro ur videos r insane

  • @christiancarre3392
    @christiancarre3392 3 роки тому

    Hello Tim
    Thank you so much !
    Kiss from France

  • @codeman5414
    @codeman5414 4 роки тому

    I will tell you what sir, you earned a like subscribe, and turn on notification bell. You are a great teacher!

  • @PaulSachers
    @PaulSachers 3 роки тому +1

    Every thing worked thank you so much😍💪

  • @karthickraja2178
    @karthickraja2178 5 років тому

    I want more video. Waiting ...
    Please teach all think what you have...
    Thanks,for your video

  • @SafikMaster
    @SafikMaster 4 роки тому +40

    For anyone getting this error when trying to open the deigner: "this application failed to start because no qt platform plugin could be initialized" I solved it by going into the plugins folder and copying a folder called "platforms", I then pasted the folder where the designer.exe is located.

    • @freedempire
      @freedempire 4 роки тому +20

      thank you, really helpful. for those who have the same problem: copy the whole folder of 'plugins' under folder pyqt5_tools\Qt, then paste it to folder pyqt5_tools\Qt\bin, replace, done!

    • @tonyu7689
      @tonyu7689 4 роки тому +2

      god bless you both

    • @santiagotorres6929
      @santiagotorres6929 4 роки тому +1

      Dude, God loves you

    • @SteliosZouridakis
      @SteliosZouridakis 4 роки тому +1

      Thank you very much! :D

    • @weixinfeng2999
      @weixinfeng2999 4 роки тому +1

      God loves both of you soooooooo much!!!!

  • @przemekostrowski3108
    @przemekostrowski3108 2 роки тому

    Very useful video. Thx.

  • @destinyhans8519
    @destinyhans8519 5 років тому

    Your videos are the best

  • @simonspeckert8503
    @simonspeckert8503 2 роки тому +1

    got it running on my raspberry pi 4
    sweet!

  • @codewithwasif3517
    @codewithwasif3517 5 років тому

    First one. Was waiting so badly

  • @noobownerbob
    @noobownerbob Рік тому +2

    Another way of finding where Python is installed on Windows is just typing the command in CMD: "where python" and it will show the installed locations on your PC!

  • @kimberleymataure5356
    @kimberleymataure5356 3 роки тому

    Thank you for this

  • @danilablagorodniy8465
    @danilablagorodniy8465 Рік тому

    thanks!! it`s realy help me! :)

  • @dnetne5508
    @dnetne5508 4 роки тому +3

    Wow this is interesting - it reminds me somewhat of Microsoft Visual Basic 2010 :'D
    Good ol' newbie times.

    • @Heddanofarsan
      @Heddanofarsan 4 роки тому

      Yes but that is a quite heavy program and this is luckily not something from Microsoft. Or are you saying there was ever a minimalistic utilitarian Microsoft program without a million popups and 2000 dependencies? ,)

  • @till-louiswinters3484
    @till-louiswinters3484 4 роки тому +45

    When you have no idea where you can find your python folder, open cmd/terminal and write "where python". That will show you the install path on your computer.

    • @hunter85070
      @hunter85070 4 роки тому +5

      I FUCKIIING LOVE YOOOOOOOOOUUUUUUU!!!!! THANKS ♥

    • @erectlocution
      @erectlocution 4 роки тому

      I concur with Darwin Jimenez. I'm familiar with bash/zsh, but totally forgot most of what I knew of cmd.

  • @graham287
    @graham287 4 роки тому +3

    I was 10 minutes away from sacking Python after hours of trawling far too many annoying tutorials and reviews trying to find a decent GUI RAD to use. Your tutorial on installing and running Pyqt Designer saved the day. Excellent. Thanks. Not a TShirt guy these days but do you have a Patreon page or similar?

  • @AnandoGopalChatterjee
    @AnandoGopalChatterjee 3 роки тому

    Thanks for the tutorial.
    'pip install ...' shows the installation path in almost every line of its output.

  • @electrotsmishar
    @electrotsmishar 4 роки тому

    keep it up. qt is awesome. I've used c++ one. but python is awesome too

  • @hassanmohamed-iz2un
    @hassanmohamed-iz2un 2 роки тому

    you are really wonderful expert magician thaaankss

  • @mariemmahem3426
    @mariemmahem3426 Рік тому

    you are my teacher i repect you alot

  • @bkhoo5
    @bkhoo5 Рік тому +1

    Bravo, thanks for the great sharing

  • @user-bc2ec6dg4e
    @user-bc2ec6dg4e 5 років тому

    Thanksss Man. Cheers👍👍👍👍

  • @MaStErOnSlaughtGaming
    @MaStErOnSlaughtGaming 4 роки тому

    Well explained,I love your videos...

  • @UCFc1XDsWoHaZmXom2KVxvuA
    @UCFc1XDsWoHaZmXom2KVxvuA 2 роки тому

    Dammit tech with tim you always save my butt

  • @sairajdas6692
    @sairajdas6692 4 роки тому

    Quality stuff bro

  • @jameskelly9277
    @jameskelly9277 5 років тому

    Excellent thank you

  • @vtvtify
    @vtvtify 5 років тому

    THANK YOU!

  • @Heddanofarsan
    @Heddanofarsan 4 роки тому

    Works on my mac. Thank you I cannot wait to give my nice little gui with some functionality (that I made some day ago). *Hours later*: Ahh.. that is done in the signal/slot editor XD. I was thinking what the heck.. loose ends everywhere..

  • @eniyewtsegaye4058
    @eniyewtsegaye4058 2 роки тому

    Thanks for ur effert

  • @the-name-is-max
    @the-name-is-max 3 роки тому +2

    When I watch this playlist of videos I am learning PyQt from a cutie

  • @mandadirohitreddy8086
    @mandadirohitreddy8086 2 роки тому

    Thank you sir

  • @user-mb7gs7hl2e
    @user-mb7gs7hl2e 4 роки тому

    Thanks!

  • @cornevanzyl5880
    @cornevanzyl5880 4 роки тому +4

    Import uic and just load the .ui file... it's much simpler and will save you SO much time when you want to change something

  • @manuchaudhary7902
    @manuchaudhary7902 4 роки тому

    This is great lecture

  • @beppemerlino
    @beppemerlino 4 роки тому

    You are my Hero!

  • @jesusnieto2740
    @jesusnieto2740 3 роки тому

    Thank you!

  • @ThilinaWimalapriya
    @ThilinaWimalapriya 4 роки тому

    Very helpful

  • @marcelobravo3074
    @marcelobravo3074 2 роки тому

    good tutorial.

  • @MywifeChannel
    @MywifeChannel 3 роки тому

    Designer is automatically installed with library? I mean... I simply love that tutorial!

  • @HungVo-ek7zd
    @HungVo-ek7zd 3 роки тому

    thank you!

  • @jamesstone8988
    @jamesstone8988 2 роки тому +1

    As of writing this: not compatible with python 3.10... Save yourself a lot of headache and use 3.9
    Thanks for the tutorials Tim!

  • @thestas9778
    @thestas9778 3 роки тому

    thank you very match from Russia

  • @let0uch929
    @let0uch929 2 роки тому +1

    thanks, worst tutorials I've ever seen in my life. keep this up!!!!

  • @krultu
    @krultu 3 роки тому

    Man, I gotta say something...
    *THANK YOU SO FREAKING MUCH!*
    I've been struggling for like 2 days, trying to make an stupid button work, you're a life saver!
    Btw I was just loading the .ui file by an incorrect way, lol.

  • @beelzebub3920
    @beelzebub3920 4 роки тому +71

    me having 4 python versions and 5 interpreters

    • @idkwhatnameilikewhy2236
      @idkwhatnameilikewhy2236 3 роки тому +13

      But only half of them work correctly xd

    • @beelzebub3920
      @beelzebub3920 3 роки тому +1

      @just a user tru

    • @emilkhojayev4645
      @emilkhojayev4645 3 роки тому

      do you know which python version I need to use? i got anaconda for python 3.8 but I can't find the designer file in the pyqt5_tools folder

    • @beelzebub3920
      @beelzebub3920 3 роки тому +1

      @@emilkhojayev4645 if you use windows, go to your C drive and search for Designer.exe if that doesn't find it try to install qt and repeat what I did

    • @kimberleymataure5356
      @kimberleymataure5356 3 роки тому

      😂😂😂

  • @mikaelloeser9769
    @mikaelloeser9769 5 місяців тому

    Thank you, great tuto. Just one thing, instead of explaining, how to search for hours where is python.exe on your computer, just open the console and type "where python" , that's it!

  • @paulmoss4199
    @paulmoss4199 4 роки тому +1

    Thanks for the videos Tim. Am I right in thinking that once you have converted the form design into Python code and modified that code, then you cannot modify the form in the designer any more?

  • @EnglishRain
    @EnglishRain 4 роки тому

    God bless you!!!

  • @marvincaintic4246
    @marvincaintic4246 2 роки тому

    nice video

  • @buntwogarde6583
    @buntwogarde6583 3 роки тому +3

    this man basically invented python with the amount of tutorials he has

  • @thrillbilly41
    @thrillbilly41 3 роки тому

    Who had their ear drums busted and about shat their pants when an obnoxious ad played

  • @zerotoherotrader-learntotr4925
    @zerotoherotrader-learntotr4925 5 років тому

    Great How to video, I am also creating how to video about make money off the stock market and teaching about how to trade stock and your video gave me a idea, thank you :)

  • @emirryalcin
    @emirryalcin 3 роки тому

    if didn't find designer.exe, search designer on C: then right click to first result, after that click open file location. it worked for me

  • @dabraabraka2854
    @dabraabraka2854 4 роки тому +1

    Finding the site-package directory is easy. The pip install shows the full path of the /newly/ installed modules, so just read it from the screen as it shows at 0:24 or 0:40

  • @P.L.D.
    @P.L.D. 4 роки тому

    Hi Tim, thank you for all your videos! When did you manage to learn all of those things about Python such as the GUI modules, pygame, and basically all the stuff related python? I bet you can make a hell lot of money by just doing python programming, or you are maybe already doing it and just making youtube videos in your free time? Greetings!

  • @GelsYT
    @GelsYT 4 роки тому

    Great tutorial TIM! may I ask can we directly code the backend part like what will happen if that button is pressed? THANK YOU!

  • @xiokraze
    @xiokraze 5 років тому +4

    Quick way to find your pyqt5-tools install location is to run the install command again. It'll state the package is already installed and provide the file path location!

  • @zanadev2030
    @zanadev2030 3 роки тому

    thnx ;)

  • @MarioFernandez-hx1cm
    @MarioFernandez-hx1cm 4 роки тому

    THANKSSSS

  • @vxsniffer
    @vxsniffer Рік тому +1

    I recommend PySide (now 6, for Qt6), it is very alike PyQt, but more up to date, and based on LGPL license - you don't need to publish source for your commercial code... BTW, Qt Designer comes as part of PySide, with no additional library to install.

  • @marcovalentinoalvarado3290
    @marcovalentinoalvarado3290 3 роки тому +2

    You can actually run "pip list" to check what you have installed with pip :)

  • @ernestovalenzuela5018
    @ernestovalenzuela5018 3 роки тому +1

    Excelent video! This is what I need! If I signed as a Programmer Master could I get support on how to use PyQt5 to execute c++ programs? Or, support how to use f2py / ctypes?