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

  • SEARCH
  • Home
  • 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 8258343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:30:31+00:00 2026-06-08T02:30:31+00:00

I designed a GUI and converted the .ui file to .py file, and I

  • 0

I designed a GUI and converted the .ui file to .py file, and I found a lot of wierd gibberish. Is there anyway that anyone can help me to convert this syntax to regular python so I can actually pass functions to buttons and such. I have been playing it around with for the past day and have accomplished a little.

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(929, 597)
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Intex | Server Monitor System", None, QtGui.QApplication.UnicodeUTF8))
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.plottab = QtGui.QTabWidget(self.centralwidget)
        self.plottab.setGeometry(QtCore.QRect(20, 10, 661, 511))
        self.plottab.setObjectName(_fromUtf8("plottab"))
        self.juliet = QtGui.QWidget()
        self.juliet.setObjectName(_fromUtf8("juliet"))
        self.label_2 = QtGui.QLabel(self.juliet)
        self.label_2.setGeometry(QtCore.QRect(20, 10, 111, 16))
        self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Performance Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.scrollArea_2 = QtGui.QScrollArea(self.juliet)
        self.scrollArea_2.setGeometry(QtCore.QRect(20, 30, 241, 221))
        self.scrollArea_2.setWidgetResizable(True)
        self.scrollArea_2.setObjectName(_fromUtf8("scrollArea_2"))
        self.scrollAreaWidgetContents_2 = QtGui.QWidget()
        self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents_2.setObjectName(_fromUtf8("scrollAreaWidgetContents_2"))
        self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2)
        self.label_13 = QtGui.QLabel(self.juliet)
        self.label_13.setGeometry(QtCore.QRect(330, 10, 111, 16))
        self.label_13.setText(QtGui.QApplication.translate("MainWindow", "Server Load Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label_13.setObjectName(_fromUtf8("label_13"))
        self.scrollArea_10 = QtGui.QScrollArea(self.juliet)
        self.scrollArea_10.setGeometry(QtCore.QRect(330, 30, 241, 221))
        self.scrollArea_10.setWidgetResizable(True)
        self.scrollArea_10.setObjectName(_fromUtf8("scrollArea_10"))
        self.scrollAreaWidgetContents_10 = QtGui.QWidget()
        self.scrollAreaWidgetContents_10.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents_10.setObjectName(_fromUtf8("scrollAreaWidgetContents_10"))
        self.scrollArea_10.setWidget(self.scrollAreaWidgetContents_10)
        self.label_16 = QtGui.QLabel(self.juliet)
        self.label_16.setGeometry(QtCore.QRect(20, 270, 171, 16))
        self.label_16.setText(QtGui.QApplication.translate("MainWindow", "Incoming IP Adresses/Users", None, QtGui.QApplication.UnicodeUTF8))
        self.label_16.setObjectName(_fromUtf8("label_16"))
        self.scrollArea_13 = QtGui.QScrollArea(self.juliet)
        self.scrollArea_13.setGeometry(QtCore.QRect(20, 290, 241, 181))
        self.scrollArea_13.setWidgetResizable(True)
        self.scrollArea_13.setObjectName(_fromUtf8("scrollArea_13"))
        self.scrollAreaWidgetContents_13 = QtGui.QWidget()
        self.scrollAreaWidgetContents_13.setGeometry(QtCore.QRect(0, 0, 237, 177))
        self.scrollAreaWidgetContents_13.setObjectName(_fromUtf8("scrollAreaWidgetContents_13"))
        self.scrollArea_13.setWidget(self.scrollAreaWidgetContents_13)
        self.plottab.addTab(self.juliet, _fromUtf8(""))
        self.newjulietleft = QtGui.QWidget()
        self.newjulietleft.setObjectName(_fromUtf8("newjulietleft"))
        self.scrollArea = QtGui.QScrollArea(self.newjulietleft)
        self.scrollArea.setGeometry(QtCore.QRect(20, 30, 241, 221))
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.label = QtGui.QLabel(self.newjulietleft)
        self.label.setGeometry(QtCore.QRect(20, 10, 111, 16))
        self.label.setText(QtGui.QApplication.translate("MainWindow", "Performance Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setObjectName(_fromUtf8("label"))
        self.label_12 = QtGui.QLabel(self.newjulietleft)
        self.label_12.setGeometry(QtCore.QRect(330, 10, 111, 16))
        self.label_12.setText(QtGui.QApplication.translate("MainWindow", "Server Load Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label_12.setObjectName(_fromUtf8("label_12"))
        self.scrollArea_9 = QtGui.QScrollArea(self.newjulietleft)
        self.scrollArea_9.setGeometry(QtCore.QRect(330, 30, 241, 221))
        self.scrollArea_9.setWidgetResizable(True)
        self.scrollArea_9.setObjectName(_fromUtf8("scrollArea_9"))
        self.scrollAreaWidgetContents_9 = QtGui.QWidget()
        self.scrollAreaWidgetContents_9.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents_9.setObjectName(_fromUtf8("scrollAreaWidgetContents_9"))
        self.scrollArea_9.setWidget(self.scrollAreaWidgetContents_9)
        self.label_15 = QtGui.QLabel(self.newjulietleft)
        self.label_15.setGeometry(QtCore.QRect(20, 270, 171, 16))
        self.label_15.setText(QtGui.QApplication.translate("MainWindow", "Incoming IP Adresses/Users", None, QtGui.QApplication.UnicodeUTF8))
        self.label_15.setObjectName(_fromUtf8("label_15"))
        self.scrollArea_12 = QtGui.QScrollArea(self.newjulietleft)
        self.scrollArea_12.setGeometry(QtCore.QRect(20, 290, 241, 181))
        self.scrollArea_12.setWidgetResizable(True)
        self.scrollArea_12.setObjectName(_fromUtf8("scrollArea_12"))
        self.scrollAreaWidgetContents_12 = QtGui.QWidget()
        self.scrollAreaWidgetContents_12.setGeometry(QtCore.QRect(0, 0, 237, 177))
        self.scrollAreaWidgetContents_12.setObjectName(_fromUtf8("scrollAreaWidgetContents_12"))
        self.scrollArea_12.setWidget(self.scrollAreaWidgetContents_12)
        self.plottab.addTab(self.newjulietleft, _fromUtf8(""))
        self.custom = QtGui.QWidget()
        self.custom.setObjectName(_fromUtf8("custom"))
        self.comboBox = QtGui.QComboBox(self.custom)
        self.comboBox.setGeometry(QtCore.QRect(20, 30, 74, 22))
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "Hulk", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "Superman", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setItemText(2, QtGui.QApplication.translate("MainWindow", "Karma", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setItemText(3, QtGui.QApplication.translate("MainWindow", "wdl", None, QtGui.QApplication.UnicodeUTF8))
        self.comboBox.addItem(_fromUtf8(""))
        self.comboBox.setItemText(4, QtGui.QApplication.translate("MainWindow", "Pong", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3 = QtGui.QLabel(self.custom)
        self.label_3.setGeometry(QtCore.QRect(20, 10, 71, 16))
        self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Select Server", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.scrollArea_7 = QtGui.QScrollArea(self.custom)
        self.scrollArea_7.setGeometry(QtCore.QRect(20, 100, 241, 221))
        self.scrollArea_7.setWidgetResizable(True)
        self.scrollArea_7.setObjectName(_fromUtf8("scrollArea_7"))
        self.scrollAreaWidgetContents_7 = QtGui.QWidget()
        self.scrollAreaWidgetContents_7.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents_7.setObjectName(_fromUtf8("scrollAreaWidgetContents_7"))
        self.scrollArea_7.setWidget(self.scrollAreaWidgetContents_7)
        self.label_10 = QtGui.QLabel(self.custom)
        self.label_10.setGeometry(QtCore.QRect(20, 80, 111, 16))
        self.label_10.setText(QtGui.QApplication.translate("MainWindow", "Performance Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.scrollArea_8 = QtGui.QScrollArea(self.custom)
        self.scrollArea_8.setGeometry(QtCore.QRect(360, 100, 241, 221))
        self.scrollArea_8.setWidgetResizable(True)
        self.scrollArea_8.setObjectName(_fromUtf8("scrollArea_8"))
        self.scrollAreaWidgetContents_8 = QtGui.QWidget()
        self.scrollAreaWidgetContents_8.setGeometry(QtCore.QRect(0, 0, 237, 217))
        self.scrollAreaWidgetContents_8.setObjectName(_fromUtf8("scrollAreaWidgetContents_8"))
        self.scrollArea_8.setWidget(self.scrollAreaWidgetContents_8)
        self.label_11 = QtGui.QLabel(self.custom)
        self.label_11.setGeometry(QtCore.QRect(360, 80, 111, 16))
        self.label_11.setText(QtGui.QApplication.translate("MainWindow", "Server Load Monitor", None, QtGui.QApplication.UnicodeUTF8))
        self.label_11.setObjectName(_fromUtf8("label_11"))
        self.label_14 = QtGui.QLabel(self.custom)
        self.label_14.setGeometry(QtCore.QRect(20, 340, 171, 16))
        self.label_14.setText(QtGui.QApplication.translate("MainWindow", "Incoming IP Adresses/Users", None, QtGui.QApplication.UnicodeUTF8))
        self.label_14.setObjectName(_fromUtf8("label_14"))
        self.scrollArea_11 = QtGui.QScrollArea(self.custom)
        self.scrollArea_11.setGeometry(QtCore.QRect(20, 360, 241, 111))
        self.scrollArea_11.setWidgetResizable(True)
        self.scrollArea_11.setObjectName(_fromUtf8("scrollArea_11"))
        self.scrollAreaWidgetContents_11 = QtGui.QWidget()
        self.scrollAreaWidgetContents_11.setGeometry(QtCore.QRect(0, 0, 237, 107))
        self.scrollAreaWidgetContents_11.setObjectName(_fromUtf8("scrollAreaWidgetContents_11"))
        self.scrollArea_11.setWidget(self.scrollAreaWidgetContents_11)
        self.plottab.addTab(self.custom, _fromUtf8(""))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.plottab.addTab(self.tab, _fromUtf8(""))
        self.pushButton = QtGui.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(510, 530, 75, 23))
        self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "Refresh", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.pushButton_2 = QtGui.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(600, 530, 75, 23))
        self.pushButton_2.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.progressBar = QtGui.QProgressBar(self.centralwidget)
        self.progressBar.setGeometry(QtCore.QRect(20, 530, 118, 23))
        self.progressBar.setProperty("value", 24)
        self.progressBar.setObjectName(_fromUtf8("progressBar"))
        self.scrollArea_3 = QtGui.QScrollArea(self.centralwidget)
        self.scrollArea_3.setGeometry(QtCore.QRect(710, 30, 191, 80))
        self.scrollArea_3.setWidgetResizable(True)
        self.scrollArea_3.setObjectName(_fromUtf8("scrollArea_3"))
        self.scrollAreaWidgetContents_3 = QtGui.QWidget()
        self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 187, 76))
        self.scrollAreaWidgetContents_3.setObjectName(_fromUtf8("scrollAreaWidgetContents_3"))
        self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3)
        self.label_17 = QtGui.QLabel(self.centralwidget)
        self.label_17.setGeometry(QtCore.QRect(710, 10, 171, 16))
        self.label_17.setText(QtGui.QApplication.translate("MainWindow", "Alerts", None, QtGui.QApplication.UnicodeUTF8))
        self.label_17.setObjectName(_fromUtf8("label_17"))
        self.label_4 = QtGui.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(710, 130, 46, 13))
        self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Plots", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 929, 18))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menuEdit = QtGui.QMenu(self.menubar)
        self.menuEdit.setTitle(QtGui.QApplication.translate("MainWindow", "Edit", None, QtGui.QApplication.UnicodeUTF8))
        self.menuEdit.setObjectName(_fromUtf8("menuEdit"))
        self.menuAbout = QtGui.QMenu(self.menubar)
        self.menuAbout.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
        self.menuAbout.setObjectName(_fromUtf8("menuAbout"))
        self.menuView = QtGui.QMenu(self.menubar)
        self.menuView.setTitle(QtGui.QApplication.translate("MainWindow", "View", None, QtGui.QApplication.UnicodeUTF8))
        self.menuView.setObjectName(_fromUtf8("menuView"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionSave_Data = QtGui.QAction(MainWindow)
        self.actionSave_Data.setEnabled(False)
        self.actionSave_Data.setText(QtGui.QApplication.translate("MainWindow", "Save Data ", None, QtGui.QApplication.UnicodeUTF8))
        self.actionSave_Data.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+S", None, QtGui.QApplication.UnicodeUTF8))
        self.actionSave_Data.setObjectName(_fromUtf8("actionSave_Data"))
        self.actionPrint = QtGui.QAction(MainWindow)
        self.actionPrint.setText(QtGui.QApplication.translate("MainWindow", "Print            ", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPrint.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+P", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPrint.setObjectName(_fromUtf8("actionPrint"))
        self.actionExit = QtGui.QAction(MainWindow)
        self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit.setObjectName(_fromUtf8("actionExit"))
        self.actionExit_2 = QtGui.QAction(MainWindow)
        self.actionExit_2.setText(QtGui.QApplication.translate("MainWindow", "Refresh", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit_2.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+R", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit_2.setObjectName(_fromUtf8("actionExit_2"))
        self.actionExit_3 = QtGui.QAction(MainWindow)
        self.actionExit_3.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit_3.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
        self.actionExit_3.setObjectName(_fromUtf8("actionExit_3"))
        self.actionCopy = QtGui.QAction(MainWindow)
        self.actionCopy.setText(QtGui.QApplication.translate("MainWindow", "Copy", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCopy.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+C", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCopy.setObjectName(_fromUtf8("actionCopy"))
        self.actionCut = QtGui.QAction(MainWindow)
        self.actionCut.setText(QtGui.QApplication.translate("MainWindow", "Cut", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCut.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Shift+C", None, QtGui.QApplication.UnicodeUTF8))
        self.actionCut.setObjectName(_fromUtf8("actionCut"))
        self.actionPaste = QtGui.QAction(MainWindow)
        self.actionPaste.setText(QtGui.QApplication.translate("MainWindow", "Paste", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPaste.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+P", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPaste.setObjectName(_fromUtf8("actionPaste"))
        self.actionContact_Us = QtGui.QAction(MainWindow)
        self.actionContact_Us.setText(QtGui.QApplication.translate("MainWindow", "Contact Us", None, QtGui.QApplication.UnicodeUTF8))
        self.actionContact_Us.setObjectName(_fromUtf8("actionContact_Us"))
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
        self.actionDocumentation = QtGui.QAction(MainWindow)
        self.actionDocumentation.setText(QtGui.QApplication.translate("MainWindow", "Documentation", None, QtGui.QApplication.UnicodeUTF8))
        self.actionDocumentation.setObjectName(_fromUtf8("actionDocumentation"))
        self.actionPython_Interpreter = QtGui.QAction(MainWindow)
        self.actionPython_Interpreter.setText(QtGui.QApplication.translate("MainWindow", "Python Interpreter", None, QtGui.QApplication.UnicodeUTF8))
        self.actionPython_Interpreter.setObjectName(_fromUtf8("actionPython_Interpreter"))
        self.menuFile.addAction(self.actionSave_Data)
        self.menuFile.addAction(self.actionPrint)
        self.menuFile.addAction(self.actionExit_2)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionExit_3)
        self.menuEdit.addAction(self.actionCopy)
        self.menuEdit.addAction(self.actionCut)
        self.menuEdit.addAction(self.actionPaste)
        self.menuAbout.addAction(self.actionContact_Us)
        self.menuAbout.addSeparator()
        self.menuAbout.addAction(self.actionAbout)
        self.menuAbout.addSeparator()
        self.menuAbout.addAction(self.actionDocumentation)
        self.menuView.addAction(self.actionPython_Interpreter)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuEdit.menuAction())
        self.menubar.addAction(self.menuView.menuAction())
        self.menubar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(MainWindow)
        self.plottab.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        self.plottab.setTabText(self.plottab.indexOf(self.juliet), QtGui.QApplication.translate("MainWindow", "Juliet", None, QtGui.QApplication.UnicodeUTF8))
        self.plottab.setTabText(self.plottab.indexOf(self.newjulietleft), QtGui.QApplication.translate("MainWindow", "Newjulietleft", None, QtGui.QApplication.UnicodeUTF8))
        self.plottab.setTabText(self.plottab.indexOf(self.custom), QtGui.QApplication.translate("MainWindow", "Custom", None, QtGui.QApplication.UnicodeUTF8))
        self.plottab.setTabText(self.plottab.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "Overall Analasys", None, QtGui.QApplication.UnicodeUTF8)

)

  • 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-06-08T02:30:32+00:00Added an answer on June 8, 2026 at 2:30 am

    You shouldn’t change this file. It is a generated file.

    What you have to do is create a new class that inherits from Ui_MainWindow.

    Create a new module and do something like this:

    import sys
    from PyQt4 import QtCore, QtGui
    import your_generated_module
    
    class MyMain(QtGui.QMainWindow, your_generated_module.Ui_MainWindow):
        def __init__(self, parent=None):
            super(MyMain, self).__init__(parent)
            self.setupUi(self)  
            # example of an event - pushbutton
            self.connect(self.pushButton, 
                         QtCore.SIGNAL("clicked()"),
                         self.test_print)
    
        def test_print():
            print "It worked!"    
    
    def main():
       app = QtGui.QApplication(sys.argv)
       main_window = MyMain()
       main_window.show()
       app.exec_()
    
    if __name__ == '__main__':
       main()
    

    Now, if you run this code you you’ll see your main window. Clicking the pushButton will print “It worked!” at the standard output (console).

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

Sidebar

Related Questions

I have recently found that Matlab can use LaTeX character sequences. However, they only
I have a poker game where I designed a nice pretty GUI that displays
I have designed this gui in netBeans which has a canvas , a couple
I am new new to GWT. I have designed the Gui using GWT designer.
I want a visual GUI designer that will produce XML output in the format
I designed a report in iReport that has a straight forward query as the
I designed the data access portion of our framework so that every time a
I have a view designed like that: Ext.define('MY.view.NotificationMails', { extend: 'Ext.grid.Panel', alias: 'widget.NotificationMailsPanel', id:
I am a beginner to android and have designed a login GUI for app
I have designed a GUI with uitabs. I want to achieve a smooth transition

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.