Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 676695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:57:26+00:00 2026-05-14T00:57:26+00:00

I’m new to Python and am starting to teach myself GUI programming (hopefully) using

  • 0

I’m new to Python and am starting to teach myself GUI programming (hopefully) using PyQT4.7 and Python 2.6

I just downloaded the whole PyQT/QT4 package (including QTDesigner) from the PyQT website, however it seems QTDesigner, which looks amazing to use as a newbie (since you can see all the attributes/properties/defaults etc) of each widget and visually edit the properties is great, but PyQT seems not to set QTDesigner to integrate directly with with PyQT and PyQTs python code generation scripts:

i.e.: Hitting “View Code”, tries to run the Designer->C++ script called (uic) instead of the pyuic.py script, etc.

Is there a way to get QTDesigner to integrate closely with PyQT for code generation on the fly like it does with C++?

If not, does that mean I have to code the entire QT GUI within my Python IDE and lookup all the documentation and boilerplate code for every widget? (seems very inefficient and inelegant compared to just having QTDesigner+Python integration).

What is the customary toolchain//production flow of using Designer with PyQT? (If no direct integration is possible — do python+pyQT users just skip using QTDesigner all together and manually write all the QT GUI code in python?)

Any additional tips/suggestions for a PyQT newbie would be appreciated. Thanks!

ps I know a bunch of you are probably going to tell me to just suck it up and code all the QT UI by hand, but if I use Designer while learning as asked above, please provide a way to do that so I can learn it more easily, thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:57:27+00:00Added an answer on May 14, 2026 at 12:57 am

    I started to write my first PyQT application (PyQT is used only to handle GUI), and it seems, that good toolchain is: QtDesigner to generate .ui s and handle resources and some IDE, that can set QtDesigner to edit those. I use Eclipse, cause it is highly customisable.
    You can compile your .qrc and .ui by demand by doing somewhat like this at application start, or at setup, or any other time:

    os.system("pyrcc4.exe -o ui/images_rc.py ui/images/images.qrc")
    uic.compileUiDir(appDir + '/ui', True)
    

    and then using generated classes this way:

    class MyMainWindow(QtGui.QMainWindow):
    
        def __init__(self, owner):
            QtGui.QMainWindow.__init__(self)
            # 'Ui_MyMainWindow' is the class, that was generated by uic, 
            # naming convention is: 'Ui_' plus the name of root widget in designer
            self.ui = Ui_MyMainWindow()
            self.ui.setupUi(self)
    

    or you can load .ui directly when container inits:

        QtGui.QMainWindow.__init__(self)
        self.ui = None
        uic.loadUi('MyMainWindowUI.ui', self.ui)
        #now you have the instance of Ui_MyMainWindow in self.ui too, as above
    

    note, that I have added UI suffix to .ui file’s name, it was done to avoid name intersection , cause name of .py file, generated by uic, is not class name starting with ‘Ui_’, but just root widget’s one.

    And another one note: at the end of generated file uic places ‘import %.qrc name%_rc’ (by default is import images_rc) string, so you must aware this when using pyrcc4.

    The whole approach is flexible enough, it takes all dummy ui coding work from you; but you still can do some fine tuning in MyMainWindow.ui attribute, where the instance of Ui_MyMainWindow lays; and it avoids unneeded inheritance. Personally, I make _connectSlots and _initIntefrace methods in MyMainWindow to do some work designer cannot.

    Still I have to note that writing interface code by yourself is good approach, cause the code, generated by uic, is UGLY. I prefer to load .ui in place by loadUi() because of this 🙂 And if you have a lot of custom PyQT controls, it is so booooring to bring them into QtDesigner..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 443k
  • Answers 443k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I wonder if you are approaching this from the wrong… May 15, 2026 at 6:19 pm
  • Editorial Team
    Editorial Team added an answer Take a look at the <system.serviceModel> documentation in MSDN. You… May 15, 2026 at 6:19 pm
  • Editorial Team
    Editorial Team added an answer You need to save the reference for the native Date… May 15, 2026 at 6:19 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.