Python PyQt4.QtGui.QMenuBar() Examples

The following are 3 code examples of PyQt4.QtGui.QMenuBar(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PyQt4.QtGui , or try the search function .
Example #1
Source File: gui_switch.py    From rpi-course with MIT License 6 votes vote down vote up
def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(400, 240)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.checkBox = QtGui.QCheckBox(self.centralwidget)
        self.checkBox.setGeometry(QtCore.QRect(130, 80, 151, 41))
        font = QtGui.QFont()
        font.setPointSize(32)
        self.checkBox.setFont(font)
        self.checkBox.setObjectName(_fromUtf8("checkBox"))
        #MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        #MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        #MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow) 
Example #2
Source File: calculatorWinUI.py    From tutorials with MIT License 5 votes vote down vote up
def setupUi(self, CalculatorWindow):
        CalculatorWindow.setObjectName(_fromUtf8("CalculatorWindow"))
        CalculatorWindow.resize(450, 140)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(CalculatorWindow.sizePolicy().hasHeightForWidth())
        CalculatorWindow.setSizePolicy(sizePolicy)
        CalculatorWindow.setMinimumSize(QtCore.QSize(0, 140))
        CalculatorWindow.setMaximumSize(QtCore.QSize(16777215, 140))
        self.centralwidget = QtGui.QWidget(CalculatorWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        CalculatorWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(CalculatorWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 450, 22))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        CalculatorWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(CalculatorWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        CalculatorWindow.setStatusBar(self.statusbar)
        self.actionClear = QtGui.QAction(CalculatorWindow)
        self.actionClear.setObjectName(_fromUtf8("actionClear"))
        self.menuFile.addAction(self.actionClear)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(CalculatorWindow)
        QtCore.QMetaObject.connectSlotsByName(CalculatorWindow) 
Example #3
Source File: glyph_ui.py    From tutorial-vtk-pyqt with MIT License 4 votes vote down vote up
def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(800, 600)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.splitter = QtGui.QSplitter(self.centralwidget)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName(_fromUtf8("splitter"))
        self.frame = QtGui.QFrame(self.splitter)
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName(_fromUtf8("frame"))
        self.verticalLayout = QtGui.QVBoxLayout(self.frame)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(self.frame)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.threshold_slider = QtGui.QSlider(self.frame)
        self.threshold_slider.setOrientation(QtCore.Qt.Horizontal)
        self.threshold_slider.setObjectName(_fromUtf8("threshold_slider"))
        self.verticalLayout.addWidget(self.threshold_slider)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.label_2 = QtGui.QLabel(self.frame)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout.addWidget(self.label_2)
        self.vector_size = QtGui.QLabel(self.frame)
        self.vector_size.setFrameShape(QtGui.QFrame.StyledPanel)
        self.vector_size.setFrameShadow(QtGui.QFrame.Sunken)
        self.vector_size.setObjectName(_fromUtf8("vector_size"))
        self.verticalLayout.addWidget(self.vector_size)
        self.vtk_panel = QtGui.QFrame(self.splitter)
        self.vtk_panel.setFrameShape(QtGui.QFrame.StyledPanel)
        self.vtk_panel.setFrameShadow(QtGui.QFrame.Raised)
        self.vtk_panel.setObjectName(_fromUtf8("vtk_panel"))
        self.horizontalLayout.addWidget(self.splitter)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 27))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)