Qt Designer – PyQt with Python GUI Programming tutorial

The Qt Designer, which comes with PyQt, allows us to utilize a Graphical User Interface to help us make a graphical user interface!

We can use the Qt Designer to help with the user interface of our application, things like placement of buttons, layouts, and more can all be handled with the qt designer.

sample code:


  1. Hi buddy!
    I have created a simple design using this Qt designer containing buttons. Now i want that on click of button the python(2.7) Scripts should run (instead of running them from the command prompt). Also initially for my python Script to run it needs data which will be entered by user itself when the script runs.
    Now what should i do?? Please Help.

  2. "pyuic4" instead of "pyuic" is more like it. Plus if it is still not recognized, just add "C:toolspython" to "PATH" in the environment variables.

    -see if folder exists first, if doesn't exist look for a similar one with perhaps a version number attached to it
    -in the environment variables (accessible through properties on this computer folder>advanced>environment variables>path>add).

  3. what you showed is quite easy.But I had the impression that this application you've shown can extract an executable file for each operating system separately!If I want to create an executable package the final version of the program how will I do it?

  4. What happen if I want to modify the ui file after I did some coding on the previously generated py file? If I run the pyuic command again, it's going to overwrites the first py file and loses all my coding.

  5. Hi Sentdex. Would you have the time to do a video series on how to convert GUI apps into exe in the right way? Currently I use Pyinstaller but somehow feel there must be a more advanced way of doing it. Pyinstaller sometimes lacks dependencies for certain modules. Correct me if I am wrong. And thanks always to the great content 🙂

Leave a Reply

Your email address will not be published.