Python GUI's with PyQt5

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

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

  • @Luix
    @Luix 6 лет назад +172

    This video is really good, another person would do this in 3 videos of 15 minutes each

    • @PyTutorials
      @PyTutorials  6 лет назад +21

      Thanks for recognizing this! I generally get a lot of good feedback about they speed I do these in but there are always a few that don't understand what a pause button is. I'm glad you like the approach.

    • @mr1enrollment
      @mr1enrollment 6 лет назад +1

      good only if you don't want to really learn

    • @PyTutorials
      @PyTutorials  6 лет назад +5

      @@mr1enrollment This is more of an introductory video to some possible basics if you couldn't tell.

    • @mr1enrollment
      @mr1enrollment 6 лет назад +1

      I was reacting to the pace, it is way to fast and mechanical to be effective IMHO. The topic is interesting I am now glad to know of it. It is about time for a tool like this. Packing methods suck, and require too much effort to layout a GUI. NI LabWindows CVI and other tools have had this type tool for ~20 years or more. So good topic.

    • @coldhardwick
      @coldhardwick 5 лет назад +3

      Definitely agree with this. Others also use lots of fruity language and dull examples on there own projects. I really just want the meat and potatoes. PyTutorials give us exactly that.

  • @dedataguy
    @dedataguy 5 лет назад +62

    Wasted several hours on Tutorials on something I could of learn in 8 minutes. Thanks

  • @shrideepgaddad8721
    @shrideepgaddad8721 5 лет назад +75

    Nice to know there is something other than Tkinter

    • @kristypolymath1359
      @kristypolymath1359 5 лет назад +10

      Tkinter is a terrible library.

    • @go371211
      @go371211 5 лет назад +3

      tkinter is unbelievably terrible, it brought me countless hours of banging head in front of my computer.

  • @herbertduncan5838
    @herbertduncan5838 4 года назад +2

    The last few days I have been thinking, why someone hasn’t written something that will create widgets easily. This is great stuff. Thanks for sharing your knowledge.

  • @JohnSmith-yc8lo
    @JohnSmith-yc8lo 6 лет назад +5

    This is literally the best tutorial I've seen in the past two years. Well thought out, well prepared, and served in an informative and concise form.

    • @PyTutorials
      @PyTutorials  6 лет назад

      Comments like this mean a lot to me, thank you very much!

  • @robertbrowning3474
    @robertbrowning3474 5 лет назад +31

    I know others have mentioned it already, but thank you for the speed of the video.
    You should make a new channel and make tutorials on how to make tutorials.

    • @PyTutorials
      @PyTutorials  5 лет назад +10

      Haha, tutorials on how to make tutorials; I love the idea. If I am going to make more content though, it will probably be for this channel. If I do get more time though, I could potentially take up the idea thanks 👍

  • @LNippur
    @LNippur 5 лет назад

    Efficiency is what I often find lacking in those who produce tutorials. They do not seem to realize that time is valuable when one tries to find information, and that making an extensive video for the reasons they evaluate is inconsiderate. This meets the qualities that should have those: Speed ​​and clarity in the explanation without personalization ornaments,
    So thanks! for efficiency and your consideration to shorten the duration time. And also thank you because now I leave Glade and I lean towards PyQt, if I recently started 1 week with python and 3 days informing about GUI implementation

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      Glad you like the speed! I make my videos how I would like to watch them; I'm happy you feel the same way!

  • @RICOLWANG
    @RICOLWANG 6 лет назад +6

    This is really good for experienced Python programmers in terms of speed and content it covers. Some people would record a video and just keep talking tons of bullshit then start to code character by character to move forward. Yours are much better!

  • @kylesmyth1867
    @kylesmyth1867 5 лет назад +3

    I love your fast method of teaching. Subbed and ready to learn. You can say I'm very entry level, like honestly just started a few months ago and nowhere can I find and one that can explain something so clear and in good time as you. Well done I will be following you from now on.

    • @PyTutorials
      @PyTutorials  5 лет назад

      I'm glad you liked the the format! Good luck on learning Python!

  • @logwet7291
    @logwet7291 4 года назад

    Goddamn what a fresh breath of air to watch a tutorial that doesn't stretch 10 mins worth of content into 30.

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm glad you liked the format!

  • @RoyPeer
    @RoyPeer 6 лет назад +8

    What a phenomenal tutorial. It is concise yet packed with useful data presented in a clear way. Same applies to the rest of your tutorials, thank you !

  • @abc3631
    @abc3631 5 лет назад

    This is how coding tutorials should be, no wasting time in floundering over keyboard and to the point. Keep it up

    • @PyTutorials
      @PyTutorials  5 лет назад

      Thanks man! Glad you like the format.

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

    With a high speed but very useful. I learned in 8 minutes what is PyQt5 and can decide about learning it or Kivy.

  • @sriramab
    @sriramab 6 лет назад

    Brilliant, this is how you make a clear, concise video to save everybody's time, retain the viewer for the entire length of the video and make the viewer ask for more !

    • @PyTutorials
      @PyTutorials  6 лет назад

      I'm glad you enjoyed the length of the video! I try my best to keep these engaging while knowing the pause button is always available so it is always good getting feedback on this idea in my videos.

  • @gentuxable
    @gentuxable 4 года назад +1

    Wow I use python to do some automated testing I did not think it is that easy to add a view that easily. Definitely worth trying.

    • @PyTutorials
      @PyTutorials  4 года назад

      Python is definitely a lot more than automated testing 😀

  • @Kasas90
    @Kasas90 5 лет назад +1

    Thank GOD somebody fast forward his videos to go to straight to the point.

    • @PyTutorials
      @PyTutorials  5 лет назад

      The less "Um"s the better 👍

  • @okiseeyou
    @okiseeyou 5 лет назад +1

    Neat trick for Windows users: open a CMD window in the current Explorer location just by typing ‘cmd’ (without the quotes) in the URI field (the field that shows your file path) and hitting Enter

    • @PyTutorials
      @PyTutorials  5 лет назад

      I was amazed when I learnt this a couple of years back - it's great that it even sets the current working directory to where you opened it from

  • @HarveyMackiee
    @HarveyMackiee 5 лет назад

    Class, really appreciate this man, was getting fed up of Tkinter and the other videos covering the PyQt5 designer are not as precise, none mentioned that the package could be installed via pip. Huge time saver watching this video, thanks.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Glad this was helpful! The old method to get the designer used to be by installing an exe but you are correct, using pip makes it much easier.

  • @brettgregory3622
    @brettgregory3622 5 лет назад +2

    Finally! I have BEEN searching for something this easy to follow! Subscribing after seeing this, please keep uploading great content such as this!

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      Glad you enjoyed it! I try to find time for new videos but they do take quite a bit of time to make.

  • @SisiraSomaratne
    @SisiraSomaratne 5 лет назад

    You save our time. We can learn it by pausing. A very good intelligent teacher.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Glad you enjoyed it and see what I aim for!

  • @checkmate9337
    @checkmate9337 4 года назад +1

    perfect Video. 2 hours worth of video in 8 minutes

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm glad you like the speed 👍

  • @Banikan
    @Banikan 5 лет назад

    Great video. I'm new to this stuff, writing programs with a GUI in general, but if i got this right then Qt Creator is simply to set up the layout, button etc. for your interface, then when you're happy with that you convert it to Python code and you start implementing what is going to happen when the different buttons are pressed and so on.

    • @PyTutorials
      @PyTutorials  5 лет назад

      That's how I typically use this tool - just to get an initial layout. You can however, import the built .py file so you don't overwrite your changes (most Python developers would have guessed this). I made a tutorial on "How to Import a PyQt5 .ui File in a Python GUI" at nitratine.net/blog/post/how-to-import-a-pyqt5-ui-file-in-a-python-gui/ if you are curious.

  • @ramaswamikv
    @ramaswamikv 4 года назад

    This is a great video, it easy to understand, with detailed step by step instructions - where the audio in sync with the video. The best Part is it works! I am really grateful. Thank you !!

    • @PyTutorials
      @PyTutorials  4 года назад

      Cheers! I'm glad you found it helpful.

  • @ЗахарТырков
    @ЗахарТырков 5 лет назад +1

    Mate, once again, right in the dead of night. I can't help myself but shout internally I lOVE U!

  • @lesmoef5357
    @lesmoef5357 6 лет назад

    Clear and to-the-point. The only thing that puzzles me is the that this way of developing, translating from source to source and basically hacking new code in it, is considered a good idea. I will adapt but it does not feel very advanced.

    • @PyTutorials
      @PyTutorials  6 лет назад

      I generally only use the tool to create the initial design and then build up from that programmatically.

  • @geraldlouis5099
    @geraldlouis5099 5 лет назад +2

    I really loved the pace of your video. Really good work, thank you

    • @PyTutorials
      @PyTutorials  5 лет назад

      Thank you! Glad you found it useful.

  • @peanut71968
    @peanut71968 4 года назад +1

    Looks like a lot of fun! Thanks for posting!

  • @billkiyimba456
    @billkiyimba456 5 лет назад +1

    Thanx mate this video makes more sense I watched more that 20 useless vids until i got this one .

  • @teatree9279
    @teatree9279 6 лет назад

    thank you so much , because of this video , i even integrated Qt and python in visual studio code editor , which made things a lot easier , and i learned a lot, and hoping for more similar tutorials, such as of the different forms and apps that can be made via this process.

    • @PyTutorials
      @PyTutorials  6 лет назад

      That's awesome! If you are going to make apps with android, I believe there are a few tutorials using Kivy but I have seen a tool before that can package PtQt5 to apks.

  • @vijayabhaskar-j
    @vijayabhaskar-j 6 лет назад +1

    You're a mind readermI'm searching for this on google and found Sendex's video series on youtube, When I about to start watching that video,I get this notification,came here to watch this first!.

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      Thanks for the support! Good luck on creating your GUI, remember stackoverflow questions will be some of the best advice you will ever get.

  • @jerinantony007
    @jerinantony007 5 лет назад +6

    My man, hope all the tutorial videos wr like urs!

  • @dp0813
    @dp0813 6 лет назад

    Very useful video for getting started! For those running from a custom environment (such as I did with Anaconda), your "pyuic5.exe" file will be located in the " Anaconda3\envs\pyqt5\Scripts " directory. Also, you "designer.exe" file may be located elsewhere, as well, when you are getting started and need to create that shortcut.
    QUESTION: How do we merely UPDATE the .py fil if we need to modify the QT widgets, labels, etc., when we convert from .ui to .py? As it is, you lose all your custom functional and setupUI classes every time you have to modify the .ui file!

    • @PyTutorials
      @PyTutorials  6 лет назад

      Thanks for that help, I don't use Anaconda so it is good to have them lying around here.
      For your question, there are two methods. One is 'importing' the .ui file; in the PyQt5 documentation (look for uic.loadUi), you can import the .ui file and then build upon it. The reason I don't use this method is because you need to call findChild which can be a bit more confusing than the methods shown here - this can also break easily if you change the names in the .ui file.
      The other option is to keep re-converting to .py and import this .py file in another python script. This other Python script will be your main script which inherits the interface from the converted .py file and then builds upon it. This way you can still use the methods in this video.

  • @Caigga900
    @Caigga900 6 лет назад

    This was a really good video. Clear and to the point. Please do more like this exploring more features using PyQt5.

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      Glad you enjoyed it! I was thinking of doing a few more interesting things in PyQt5 in the future, thanks for the recommendation!

  • @raphtlw
    @raphtlw 5 лет назад +6

    Fun fact: you can go into CMD by typing "cmd" straight into the file explorer when you click the path box of the folder you are currently in.

    • @PyTutorials
      @PyTutorials  5 лет назад +3

      When I first found this out I thought it was amazing; such a great shortcut

    • @raphtlw
      @raphtlw 5 лет назад +1

      @@PyTutorials Cheers! Love your tutorials, you explain everything so well and you make complicated stuff so much easier to understand. 🤩

    • @danielcreed2106
      @danielcreed2106 4 года назад

      That's sick. Didn't know this. It's a little easier then CDing your way there

    • @SaudiCoolPrestige
      @SaudiCoolPrestige 4 года назад

      Thanx man

  • @SeamusHarper1234
    @SeamusHarper1234 6 лет назад +8

    I love the speed!!!!!!

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      Thanks heaps! I try to keep my videos free of things that waste time.

  • @3DavyJones
    @3DavyJones 4 года назад

    Very useful tutorial. Just a note, when adding many items like in the second example do it slower because those are all new concepts and I couldn't find the buttons so I had to slow down the video.

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm sorry you found the video a bit too fast. When I was making it, the target was to get people to pause and watch themselves do it instead of following a video action-by-action.

  • @mujeebishaque
    @mujeebishaque 5 лет назад

    I've infinitely loved this. Very concise, to the point, lovable, appreciatable, awesome tutorial. Please do more videos. Thank You so much!

  • @neatoelectro3687
    @neatoelectro3687 4 года назад

    This is exactly what I needed, So grateful I found this video. Thank you!!!

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm glad you found it useful!

  • @brandoncyoung
    @brandoncyoung 4 года назад +1

    incredibly concise. thanks

  • @rohrl77
    @rohrl77 4 года назад +1

    Your videos are great! Thanks a ton. I'm learning a ton.

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm glad you find them useful 👍

  • @shaneumayanga6189
    @shaneumayanga6189 6 лет назад +1

    Great Tutorial , you can add the path of your python Scrips folder to your environment variables so you can access pyuic5 from anywhere and from any folder without changing your directory to the scrips folder. Thanks in advance : -)

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      I used to teach this way but people couldn't understand to use their own path. You are 100% correct though, it makes it a LOT easier. Also the directory should be on the PATH if they selected it in the instillation.

  • @rahmatdicky2971
    @rahmatdicky2971 5 лет назад +1

    Fast, clear, and precisely!
    Thanks for the videos!

  • @PyTutorials
    @PyTutorials  5 лет назад +2

    It appears that the pyqt5_tools package has been updated recently and the location of pyuic5.exe and designer.exe executables could potentially be in a new location. If you cannot find these executables, try looking in pyqt5_tools\Qt\bin (thanks to Torsten W
    and Roberto Rivera
    for making me aware of this).
    Alternatively, I see that the binaries can also be found in the "Scripts" folder in the root directory of your Python installation (are installing the packages of course).
    Sorry for this confusion, I do not have control over the package so anything can change at any time.

    • @abdelrahmanswiedan6373
      @abdelrahmanswiedan6373 5 лет назад

      Hi Py, great video, but I need your help. I tried looking for the executables in pyqt5_tools and everything, but I wasn't able to find them. Should I install a specific version of Python and PyQt5, this is a very urgent matter, please help!!!!

    • @PyTutorials
      @PyTutorials  5 лет назад

      Was the pyqt5_tools folder in the site packages folder?

    • @ITQuestIT
      @ITQuestIT 5 лет назад

      @@PyTutorials You shuold add this information to your Python GUI's on Nitrantine

    • @PyTutorials
      @PyTutorials  5 лет назад

      @@ITQuestIT, just added it! Thanks for the reminder

  • @mithgil-cool
    @mithgil-cool 6 лет назад +3

    Very clear and fast tutorial!

  • @abderrahmanesebaa7638
    @abderrahmanesebaa7638 4 года назад

    Great video. Loved it! I would really like to see a video from you showing how to create window with multiple views.. Like if you press a button., new buttons and labels show up with a button that can take you back to the original view. If anyone reading this knows how, please share.

    • @PyTutorials
      @PyTutorials  4 года назад +1

      I have done this before in a project and have an example at github.com/brentvollebregt/multi-clipboard/blob/master/multi_clipboard/ui.py#L203 . You can see that I have another class that inherits QtWidgets.QWidget on line 260 - this could be outside the class I have it in, I just put it in there for ease. You can then see after creating an instance of it, I call .show().
      Although this might not be too helpful as it doesn't show the basics.
      This example, however, is to show a new window. You would be better off to use the same window by removing all the contents and re-populating with the contents you now want.

    • @abderrahmanesebaa7638
      @abderrahmanesebaa7638 4 года назад

      @@PyTutorials ok, thank you.

  • @gabriellaamelia1333
    @gabriellaamelia1333 5 лет назад +2

    thank you so much for the clear explanation

  • @johnleninkravitz
    @johnleninkravitz 5 лет назад +2

    Amazing explanation, thank you so much.

  • @adelnemer1462
    @adelnemer1462 5 лет назад

    u r the best i never seen somone like u, speed and a lot of information thanks bro

  • @rahulbhai9948
    @rahulbhai9948 6 лет назад

    Bro.. You r awesome ....just keep going...your tutorials r really useful in real life...Thank you so much...hope you will continue like this...

    • @PyTutorials
      @PyTutorials  6 лет назад

      Thanks heaps for the appreciation!

  • @dimitrisgkiousas8928
    @dimitrisgkiousas8928 5 лет назад +1

    excellent tutorial and i recomend visiting your written tutorial website!!!

    • @PyTutorials
      @PyTutorials  5 лет назад

      Thanks man! And yes, I try to write posts for each of my videos now so if you are unsure about any of the video, check out the site first (I can update a website but not a published video); thank you for noticing!

  • @queryfindershome5253
    @queryfindershome5253 6 лет назад +1

    nice one..point to point and exactly what i was finding

  • @bogpan
    @bogpan 6 лет назад

    I won't use tKinter anymore
    A very useful video like all of yours
    If that PyQt GUI maker app is made in python too...wow

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      Thank you! The GUI maker I believe would be written in C++ since that's what Qt is written in; they have just added a python interface to the code to make it accessible.

  • @felixtheRHYTHMCHEF
    @felixtheRHYTHMCHEF 6 лет назад +1

    Brilliant tutorial! Thank you so much you made things very clear.

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

    Exactly what I was thinking thanks //ji

  • @cameron6803
    @cameron6803 5 лет назад +3

    amazing video ty

  • @arpanelectro
    @arpanelectro 5 лет назад +1

    Best 8 minutes of 2018

  • @iamphr
    @iamphr 4 года назад +1

    good introduction, really helpful, thanks.

    • @PyTutorials
      @PyTutorials  4 года назад +1

      Cheers! I'm glad you found it useful 👍

  • @fordisdrinking
    @fordisdrinking 4 года назад

    A tip for converting *.ui to *.py with pyuic5 :
    When you are in the folder of your .ui, open a shell then write the following command in it:
    pyuic5 *.ui > *.py
    where *.ui is your GUI and *.py will be your GUI in python code.
    This is easier than typing the whole path everytime !

    • @PyTutorials
      @PyTutorials  4 года назад +1

      The reason I type the whole path out in this video is for people that don't understand what relative paths are. I get a lot of people complaining that something is broken or I did something wrong when really they are not in the correct directory; using absolute paths helps mitigate this.

    • @fordisdrinking
      @fordisdrinking 4 года назад +1

      @@PyTutorials yes, definitely. It is a tip for guys who get it 😉

  • @EasyElectronics2412
    @EasyElectronics2412 6 лет назад +3

    Another awesome video 😘😍😍btw in your videos i came to know that its good if an error occurs 😂😂

  • @Finn-jp6pn
    @Finn-jp6pn 5 лет назад +1

    Thank you so much!! This helps a lot

  • @slycordinator
    @slycordinator 5 лет назад +1

    Instead of using full-paths for the individual files you're trying to modify from the CLI, I think it seems easier to instead stay in the directory of the files you're wanting to mess with, then call the pyuic5 executable using ITS full path.
    Less copy/paste that way, since you're only using one thing that must be a full path.
    Incidentally, on my Anaconda install (with python-3.6 on windows), I don't have a pyuic5.exe but a pyuic5.bat. It worked fine.

    • @PyTutorials
      @PyTutorials  5 лет назад

      I wish I could use relative paths in these videos but too many people get confused with relative paths and the command prompt in general thus forcing me to use absolute paths. The whole situation annoys me too.

    • @slycordinator
      @slycordinator 5 лет назад

      @@PyTutorials Interesting, because as-is it still uses relative paths. Hehe
      But I see where you're coming from on that.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Oh, were did I used relative paths?

    • @slycordinator
      @slycordinator 5 лет назад

      @@PyTutorials You moved to a certain directory then invoked pyuic5 relative to that directory. That's a relative path, is it not?

    • @PyTutorials
      @PyTutorials  5 лет назад

      Oh right. I wanted people to find the executable before they started to use it, so this was the best way to verify that they had the correct path.

  • @deathtospi9072
    @deathtospi9072 5 лет назад

    At last what I've been waiting for and I was wondering why a "super" language is very aggressive!

    • @PyTutorials
      @PyTutorials  5 лет назад

      What do you mean by aggressive?

    • @deathtospi9072
      @deathtospi9072 5 лет назад

      If you see how the design orientation in Microsoft visual Basic 6.0 was wasou know what user friendly means!!?? but I mean PYTHON does not give you that simplicity in G.U.I. !@@PyTutorials

    • @deathtospi9072
      @deathtospi9072 5 лет назад

      It is all about first make your G.U.I. and then add the code to it...!

    • @PyTutorials
      @PyTutorials  5 лет назад

      I agree, Visual Studio makes it a lot easier to design GUI's but Python and .NET/C# are very different. Python is not developed like C# is, C# has a lot more resources behind it's development.

    • @deathtospi9072
      @deathtospi9072 5 лет назад

      well C# is the only language that I never came across and learn and I have learned a lot of languages @@PyTutorials

  • @SHONNER
    @SHONNER 4 года назад +1

    Qt Designer is the best!

  • @zhumarh8902
    @zhumarh8902 5 лет назад +1

    tanks for tutorial, makes me easy to learn

  • @raphaelruan1626
    @raphaelruan1626 5 лет назад +1

    really helpful , tks alot !

  • @fleks6564
    @fleks6564 5 лет назад +1

    I dont quite get this. Is this better than tkinter?
    Should i spend time learning it if im already learning tkinter

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      PyQt5 is so much better than tkinter in my opinion. So much more you can do.

  • @stefansen809
    @stefansen809 5 лет назад

    Excellent tutorial! Appreciate the clarity and speed of explanations.

  • @PyTax
    @PyTax 5 лет назад +1

    Great video. Like

  • @gutterrashautomotive3361
    @gutterrashautomotive3361 4 года назад +2

    That T H I C C en zed accent
    Great vid!

  • @acerlmt
    @acerlmt 5 лет назад +2

    What you recommend to use for GUI with Python and zero experience in it - Qt or GTK?

    • @PyTutorials
      @PyTutorials  5 лет назад +8

      Ooooh, good question. I feel using Qt Designer is a good starting point as it keeps people feeling like they are getting somewhere; however Qt Designer should not be fully relied upon as the real skill is constructing a GUI dynamically programmatically. PyQt5 has a lot of resources online but in some cases I feel that tKinter tutorials may be easier to follow some times.
      This is a bit of a tough one as I haven't really used tKinter that much as I saw limitations/difficulties from the beginning. I believe I would recommend PyQt5, it may take a bit more effort to learn but it is definitely worth it. Just please don't always rely on the Qt Designer to create your GUI as sometimes creating the GUI manually can be an easier method. Use Qt Designer more as a tool to see how things are constructed.

  • @patricioficarivera1659
    @patricioficarivera1659 5 лет назад +1

    Excelente !, gracias.

  • @prashanthreddy4940
    @prashanthreddy4940 6 лет назад

    Wow, I finally found solution to solve it thank you so much

  • @ZeffTheKiller_HK
    @ZeffTheKiller_HK 5 лет назад +1

    Thanks you so much!

  • @saifaldrson4182
    @saifaldrson4182 6 лет назад +2

    i love all your video

  • @escx1613
    @escx1613 5 лет назад +1

    amazing tutorial

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      Glad you found it useful!

    • @escx1613
      @escx1613 5 лет назад +1

      @@PyTutorials Thank you very much!

  • @exoson1814
    @exoson1814 5 лет назад

    Nice video. I have been using PAGE, but Qt seems like it has more features.

    • @PyTutorials
      @PyTutorials  5 лет назад

      I hadn't heard of PAGE before, looks interesting!

    • @exoson1814
      @exoson1814 5 лет назад

      @@PyTutorials It's certainly functional, but it's like a stripped down Qt Designer.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Qt also has many other features like clipboard manipulation and other cool stuff that you generally don't find in other UI frameworks.

  • @polojoser
    @polojoser 4 года назад

    You deserve a cold Heineken truck! Very Nice !!!

    • @PyTutorials
      @PyTutorials  4 года назад +1

      Haha, glad you found it useful!

  • @simbachoga5930
    @simbachoga5930 4 года назад

    Thanks dude brilliant video.

    • @PyTutorials
      @PyTutorials  4 года назад

      I'm glad you found it useful!

    • @simbachoga5930
      @simbachoga5930 4 года назад +1

      @@PyTutorials I did. I was experiences lots of errors while installing PyQt5 using the exe file.

    • @simbachoga5930
      @simbachoga5930 4 года назад

      @@PyTutorials How do i uninstall PyQt5 in command prompt, i want to install PyQt4 which is in line with my old textbook i am using.

    • @PyTutorials
      @PyTutorials  4 года назад +1

      `python -m pip uninstall pyqt5` (the standard way of uninstalling any package from pip)

  • @saeedkeyvani4086
    @saeedkeyvani4086 4 года назад

    perfect, thank you so much bro👍😊

  • @yashwantsahu6901
    @yashwantsahu6901 4 года назад

    It's really helps thank you

  • @bannytan2689
    @bannytan2689 4 года назад

    For those who can't find Qt designer,
    mine is inside path Python38-32\Lib\site-packages\pyqt5_tools\Qt\bin
    Else, open cmd, type in 'designer' then it will directly open the app for you

    • @PyTutorials
      @PyTutorials  4 года назад

      In the description I noted designer.exe has now been moved to pyqt5_tools\Qt\bin but can also be found in the \Scripts\ folder in the root of your Python installation

  • @ituk
    @ituk 5 лет назад

    Awesome speed :) Thanks

  • @edbeds
    @edbeds 6 лет назад +3

    Great video and great channel my friend! Your website is also really cool.
    Btw, sorry if this is a newbie question, but can we link a function instead of a method to a button with PyQt5 ?
    Thanks!

    • @PyTutorials
      @PyTutorials  6 лет назад +1

      What do you mean by function? To me functions and methods are the same.

    • @edbeds
      @edbeds 6 лет назад +1

      I already figured it out! I meant a function defined outside a class. But obviously I can write inside it.
      I really appreciate your work man, keep it up!

    • @PyTutorials
      @PyTutorials  6 лет назад

      Glad you got it working!

  • @rajzakku8829
    @rajzakku8829 5 лет назад +1

    Nice tutorial! However, I prefer not to implement widget behavior inside the auto-generated PyQt5 Python file, as changes would be lost if you wanted to modify the GUI with Qt Designer. Who knows if you wanted to resume the project after months of laying it aside and you can't remember exactly what to do?

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      I use the designer as more of a place to get a starting shell. You are actually allowed to modify the code that is generated to add different widgets or even change existing ones. This simply creates a good starting place for people new to PyQt5.

  • @bareerakhan7569
    @bareerakhan7569 6 лет назад +2

    Thank you sir

  • @Try2Catch
    @Try2Catch 5 лет назад

    Hi, I have a problem. I have a class Event and one is Main script. In Event class, i have on_login method and compared id and password and return the status as per the validation. Now, in main script, login_form.btn_login.clicked.connect(login). Now, while clicking i want to have the status. But, not getting. Please help.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Could you expand on this a bit more? Also I recommend using a debugger so that you can watch how the flow of your script is going.

    • @Try2Catch
      @Try2Catch 5 лет назад

      @@PyTutorials pastebin.com/JDyqqrrY This is event script. Here i have on_login method and returning self.status.
      pastebin.com/HMZKUEi3 This is the main script. on line 13, i have create event on button click and called on_login. Now, here i am struggling that, how i will get that return value in main script.

    • @PyTutorials
      @PyTutorials  5 лет назад

      Best method would be to create a definition in HMZKUEi3 which calls on_login from JDyqqrrY and then saves the value somewhere in HMZKUEi3.
      After this, connect login_form.btn_login to the new definition. This means when the button is clicked, it calls this new function which then calls the one you are trying to get the result from. Using this new function, you can then store the returen value.
      Remember, you cannot get the return of a trigger even created by the .connect definition/function, you need to create a kind of middle-man function as I have described.

  • @fowad27
    @fowad27 4 года назад

    great video! thanks for being concise. please do one going into the further functionalities of pyqt5 if you don't mind.
    I also have a question: if you need to convert the UI file to PY in order to modify the code and set up functionalities, can you no longer open the file in designer to make further modifications to the UI? Appreciate your help

    • @PyTutorials
      @PyTutorials  4 года назад

      You can only make modifications to the .ui file using the designer, not the Python script. One method to get around this is to import the .ui file in Python and then make changes in the Python script. This allows you still to make changes to the .ui file and keep your changes. I wrote a post at nitratine.net/blog/post/how-to-import-a-pyqt5-ui-file-in-a-python-gui/ explaining this.

    • @fowad27
      @fowad27 4 года назад

      @@PyTutorials but the .ui and .py files are not linked surely? Once I've exported the .ui File to .py and hooked up all the buttons, but then decide that I want to change the layout of the buttons, I would have to go back into the designer, make changes to the .ui File, export it to the .py file, then copy over the hookups to the buttons from the other file, is that not so?

    • @PyTutorials
      @PyTutorials  4 года назад

      No, the .ui and .py files are not linked, I thought you were trying to edit the .py in designer sorry. You are correct, if you make changes to the .ui file and turn it into a .py again, copy over your changes and it will be fine.

    • @fowad27
      @fowad27 4 года назад

      @@PyTutorials ah ok, no problem. Its a great little program regardless!

  • @ChrisHalden007
    @ChrisHalden007 5 лет назад

    Excellent video, Thank you. I am wondering what would be your typical workflow for working with QT Designer and python. I suspect that each time you modify your UI and generate PY file again, it override the previous python file where you had made all your event handling modifications. Is there a smart way to be able to modify the UI without loosing all your changes in python ?

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      There are a couple of ways but they are both practically the same; however I do not use them as I only use the designer for an initial skeleton and then modify the GUI programmatically from there on in. The idea is to give names like I do in this video (5:37) for referencing elements so you can find them later. Then you want to import the .py file created by pyuic5 (it can be regenerated, you don't need to edit this file) and instantiate the GUI; from here you should have a pointer to the GUI object which you can use to call each element.
      The other way is to import the .ui file and use the references like before. Once again, I do not use this method so cannot provide examples sorry.
      I know these aren't great explanations but I do not use the method currently.

  • @joffrecamacho5086
    @joffrecamacho5086 4 года назад

    thank you, thank you, thank you!!!

  • @NamNguyen-um1eu
    @NamNguyen-um1eu 4 года назад +1

    thank you very muchhhhhhhhhhhh

  • @weekhianglee8929
    @weekhianglee8929 4 года назад

    It works ! my .py file is associated with idle.bat now, I don't need do further even though "edit with IDLE " still not appeared when right click.

    • @PyTutorials
      @PyTutorials  4 года назад

      Adding the item to the right click file context menu is done by the Python installer - doing it manually is a bit involved and you would probably find it easier to re-install Python and make sure the right click file context menu entry is enabled.

  • @adityasuraj4093
    @adityasuraj4093 5 лет назад +1

    Cool Stuff

  • @emmadalziell9589
    @emmadalziell9589 6 лет назад

    wow! you have such a beautiful voice!

  • @CarlosDiaz-wp8jv
    @CarlosDiaz-wp8jv 5 лет назад

    I love this. Is there any way to format the Python output so you can put spaces and comments inbetween the section? Just to make the Python output more readable

    • @PyTutorials
      @PyTutorials  5 лет назад

      Python output? This is a GUI sorry; maybe wrong video?

  • @khaleddjebrouni1651
    @khaleddjebrouni1651 5 лет назад +1

    شكرا

  • @MichaelMichaelides1986
    @MichaelMichaelides1986 5 лет назад

    Is it possible to create some check-boxes and use them to select which data to use to create and show a graph?

    • @PyTutorials
      @PyTutorials  5 лет назад

      Yes, it is possible. There will be many ways you can do this so it might pay to experiment with a few concepts.

  • @peterfisher3161
    @peterfisher3161 5 лет назад

    Wow, that shure was an easy way to get Qt Designer for free

    • @PyTutorials
      @PyTutorials  5 лет назад +1

      Haha, I get a couple of people every so often complaining about how this method is too difficult; this is in fact one of the simpler ways and guarantees everything is setup correctly.

    • @peterfisher3161
      @peterfisher3161 5 лет назад +1

      @@PyTutorials Thank you!

  • @陳育廷-s5g
    @陳育廷-s5g 6 лет назад

    Thanks for your nice video! I follow your steps and it really works on my computer (64-bit windows 10). As a scientist, I usually import one-dimensional data and plot by matplotlib. Furthermore, I fit the data with different mathematical functions. So I am interested if the PyQt5 provides such functions that show plots produced by matplotlib in the GUI window. Thanks a lot!

    • @PyTutorials
      @PyTutorials  6 лет назад

      If glad to hear this was of help to you!

    • @陳育廷-s5g
      @陳育廷-s5g 6 лет назад

      Could you provide videos about how to add plots from matplotlib in PyQt5 app? Thanks

    • @PyTutorials
      @PyTutorials  6 лет назад

      I didn't even realise that you could use matplotlib in PyQt5 until a few weeks ago so I am not much of an expert on the topic sorry. If I do investigate the topic I will make sure to share though!

  • @brianmadrazo8101
    @brianmadrazo8101 5 лет назад

    Can you tell me where should I place my keyEvent function? I just wanted to close some form if this key was pressed. Thank you!

    • @PyTutorials
      @PyTutorials  5 лет назад

      What do you mean by your keyEvent function? I am not quite sure what you are referencing. The general idea to setup a button, is to create a class/global method, e.g.
      def printMessage(self):
      print ("Hello World!")
      and then set up between the button and the class/global method, e.g.
      self.pushButton.clicked.connect(self.printMessage)

  • @kenhaley4
    @kenhaley4 5 лет назад

    Once you've added your own code to the generated .py program, is it possible to go back to the design screen and make changes there, without losing your own code?

    • @PyTutorials
      @PyTutorials  5 лет назад

      If you inherit the UI class from a different file then yes