Python PyQt5.QtWidgets.QMenuBar() Examples
The following are 29
code examples of PyQt5.QtWidgets.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
PyQt5.QtWidgets
, or try the search function
.
Example #1
Source File: ui_qhangupsconversationslist.py From qhangups with GNU General Public License v3.0 | 6 votes |
def setupUi(self, QHangupsConversationsList): QHangupsConversationsList.setObjectName("QHangupsConversationsList") QHangupsConversationsList.resize(250, 500) self.centralwidget = QtWidgets.QWidget(QHangupsConversationsList) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.conversationsListWidget = QtWidgets.QListWidget(self.centralwidget) self.conversationsListWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.conversationsListWidget.setObjectName("conversationsListWidget") self.verticalLayout.addWidget(self.conversationsListWidget) QHangupsConversationsList.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(QHangupsConversationsList) self.menubar.setGeometry(QtCore.QRect(0, 0, 250, 27)) self.menubar.setObjectName("menubar") QHangupsConversationsList.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(QHangupsConversationsList) self.statusbar.setObjectName("statusbar") QHangupsConversationsList.setStatusBar(self.statusbar) self.retranslateUi(QHangupsConversationsList) QtCore.QMetaObject.connectSlotsByName(QHangupsConversationsList)
Example #2
Source File: ui_qhangupsconversations.py From qhangups with GNU General Public License v3.0 | 6 votes |
def setupUi(self, QHangupsConversations): QHangupsConversations.setObjectName("QHangupsConversations") QHangupsConversations.resize(500, 350) self.centralwidget = QtWidgets.QWidget(QHangupsConversations) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.conversationsTabWidget = QtWidgets.QTabWidget(self.centralwidget) self.conversationsTabWidget.setElideMode(QtCore.Qt.ElideRight) self.conversationsTabWidget.setTabsClosable(True) self.conversationsTabWidget.setMovable(True) self.conversationsTabWidget.setObjectName("conversationsTabWidget") self.gridLayout.addWidget(self.conversationsTabWidget, 0, 0, 1, 1) QHangupsConversations.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(QHangupsConversations) self.menubar.setGeometry(QtCore.QRect(0, 0, 500, 27)) self.menubar.setObjectName("menubar") QHangupsConversations.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(QHangupsConversations) self.statusbar.setObjectName("statusbar") QHangupsConversations.setStatusBar(self.statusbar) self.retranslateUi(QHangupsConversations) self.conversationsTabWidget.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(QHangupsConversations)
Example #3
Source File: interface.py From quantum-honeycomp with GNU General Public License v3.0 | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(507, 151) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(160, 20, 201, 71)) font = QtGui.QFont() font.setPointSize(20) self.label.setFont(font) self.label.setObjectName("label") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 507, 25)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #4
Source File: Demo3py.py From python with Apache License 2.0 | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1285, 688) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(830, 0, 421, 521)) self.label.setObjectName("label") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(250, 520, 93, 28)) self.pushButton.setObjectName("pushButton") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1285, 23)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #5
Source File: Designer_First_UI_Exit.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(400, 300) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName("actionNew") self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #6
Source File: Designer_First_UI.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(400, 300) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName("actionNew") self.menuFile.addAction(self.actionNew) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #7
Source File: designer.py From learningPyQt5 with Apache License 2.0 | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(480, 640) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(150, 120, 171, 61)) font = QtGui.QFont() font.setPointSize(20) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 480, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.pushButton.clicked.connect(self.button_clicked) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #8
Source File: ida2pwntools.py From ida2pwntools with Apache License 2.0 | 5 votes |
def init(self): menu_bar = next(i for i in QtWidgets.qApp.allWidgets() if isinstance(i, QtWidgets.QMenuBar)) self.menu = menu_bar.addMenu(PLUGNAME) self.menu.addAction("Connect to pwntools").triggered.connect(self.prepare_debug_ui) return idaapi.PLUGIN_KEEP
Example #9
Source File: qt.py From Sark with MIT License | 5 votes |
def __init__(self): super(MenuManager, self).__init__() self._window = get_window() self._menu = self._window.findChild(QtWidgets.QMenuBar) self._menus = {}
Example #10
Source File: ui_mainwindow.py From learningPyQt5 with Apache License 2.0 | 5 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.widget = QtWidgets.QWidget(self.centralwidget) self.widget.setGeometry(QtCore.QRect(250, 190, 301, 81)) self.widget.setObjectName("widget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.label = QtWidgets.QLabel(self.widget) self.label.setObjectName("label") self.horizontalLayout.addWidget(self.label) self.pushButton = QtWidgets.QPushButton(self.widget) self.pushButton.setMinimumSize(QtCore.QSize(50, 50)) self.pushButton.setMaximumSize(QtCore.QSize(121, 51)) self.pushButton.setObjectName("pushButton") self.horizontalLayout.addWidget(self.pushButton) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #11
Source File: Designer_Second_UI.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 5 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(400, 300) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(0, 0, 391, 241)) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.tabWidget.addTab(self.tab_2, "") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName("actionNew") self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #12
Source File: demoFileDialog.py From Qt5-Python-GUI-Programming-Cookbook with MIT License | 5 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(516, 374) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.textEdit = QtWidgets.QTextEdit(self.centralwidget) self.textEdit.setGeometry(QtCore.QRect(0, 10, 521, 331)) self.textEdit.setObjectName("textEdit") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 516, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionOpen = QtWidgets.QAction(MainWindow) self.actionOpen.setObjectName("actionOpen") self.actionSave = QtWidgets.QAction(MainWindow) self.actionSave.setObjectName("actionSave") self.menuFile.addAction(self.actionOpen) self.menuFile.addAction(self.actionSave) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #13
Source File: select.py From python with Apache License 2.0 | 5 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1279, 677) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.tableWidget = QtWidgets.QTableWidget(self.centralwidget) self.tableWidget.setGeometry(QtCore.QRect(150, 80, 441, 331)) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(0) self.tableWidget.setRowCount(0) self.pushButton = QtWidgets.QPushButton(self.centralwidget) # 生成相对应的对象 self.pushButton.setGeometry(QtCore.QRect(310, 510, 171, 61))# 确定该对象的位置以及大小 self.pushButton.setObjectName("pushButton") # 设置名字,加载对象 self.checkBox = QtWidgets.QCheckBox(self.centralwidget) self.checkBox.setGeometry(QtCore.QRect(870, 530, 91, 19)) self.checkBox.setObjectName("checkBox") self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget) self.textBrowser.setGeometry(QtCore.QRect(750, 90, 421, 321)) self.textBrowser.setObjectName("textBrowser") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1279, 23)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #14
Source File: auth.py From VKMusicDownloader with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(392, 165) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.frame_2 = QtWidgets.QFrame(self.centralwidget) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.verticalLayout = QtWidgets.QVBoxLayout(self.frame_2) self.verticalLayout.setObjectName("verticalLayout") self.lineEdit = QtWidgets.QLineEdit(self.frame_2) self.lineEdit.setObjectName("lineEdit") self.verticalLayout.addWidget(self.lineEdit) self.lineEdit_2 = QtWidgets.QLineEdit(self.frame_2) self.lineEdit_2.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor)) self.lineEdit_2.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) self.lineEdit_2.setAcceptDrops(False) self.lineEdit_2.setLayoutDirection(QtCore.Qt.LeftToRight) self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password) self.lineEdit_2.setReadOnly(False) self.lineEdit_2.setObjectName("lineEdit_2") self.verticalLayout.addWidget(self.lineEdit_2) self.pushButton = QtWidgets.QPushButton(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth()) self.pushButton.setSizePolicy(sizePolicy) self.pushButton.setObjectName("pushButton") self.verticalLayout.addWidget(self.pushButton) self.gridLayout.addWidget(self.frame_2, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 392, 21)) self.menubar.setObjectName("menubar") self.menu = QtWidgets.QMenu(self.menubar) self.menu.setObjectName("menu") MainWindow.setMenuBar(self.menubar) self.action = QtWidgets.QAction(MainWindow) self.action.setCheckable(True) self.action.setObjectName("action") self.menu.addAction(self.action) self.menubar.addAction(self.menu.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #15
Source File: main_window.py From asammdf with GNU Lesser General Public License v3.0 | 4 votes |
def setupUi(self, PyMDFMainWindow): PyMDFMainWindow.setObjectName("PyMDFMainWindow") PyMDFMainWindow.resize(800, 723) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap(":/asammdf.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off ) PyMDFMainWindow.setWindowIcon(icon) self.centralwidget = QtWidgets.QWidget(PyMDFMainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setSpacing(2) self.verticalLayout.setObjectName("verticalLayout") self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) self.stackedWidget.setFrameShape(QtWidgets.QFrame.NoFrame) self.stackedWidget.setObjectName("stackedWidget") self.stackedWidgetPage1 = QtWidgets.QWidget() self.stackedWidgetPage1.setObjectName("stackedWidgetPage1") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.stackedWidgetPage1) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setSpacing(2) self.verticalLayout_2.setObjectName("verticalLayout_2") self.files = QtWidgets.QTabWidget(self.stackedWidgetPage1) self.files.setDocumentMode(False) self.files.setTabsClosable(True) self.files.setObjectName("files") self.verticalLayout_2.addWidget(self.files) self.stackedWidget.addWidget(self.stackedWidgetPage1) self.verticalLayout.addWidget(self.stackedWidget) PyMDFMainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(PyMDFMainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26)) self.menubar.setObjectName("menubar") PyMDFMainWindow.setMenuBar(self.menubar) self.action_memory_minimum = QtWidgets.QAction(PyMDFMainWindow) self.action_memory_minimum.setCheckable(True) self.action_memory_minimum.setObjectName("action_memory_minimum") self.action_memory_full = QtWidgets.QAction(PyMDFMainWindow) self.action_memory_full.setCheckable(True) self.action_memory_full.setObjectName("action_memory_full") self.action_memory_low = QtWidgets.QAction(PyMDFMainWindow) self.action_memory_low.setCheckable(True) self.action_memory_low.setObjectName("action_memory_low") self.retranslateUi(PyMDFMainWindow) self.stackedWidget.setCurrentIndex(0) self.files.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(PyMDFMainWindow)
Example #16
Source File: gui.py From legion with GNU General Public License v3.0 | 4 votes |
def setupMenuBar(self, MainWindow): self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1010, 25)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) #self.menuSettings = QtWidgets.QMenu(self.menubar) #self.menuSettings.setObjectName(_fromUtf8("menuSettings")) self.menuHelp = QtWidgets.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionOpen = QtWidgets.QAction(MainWindow) self.actionOpen.setObjectName(_fromUtf8("actionOpen")) self.actionSave = QtWidgets.QAction(MainWindow) self.actionSave.setObjectName(_fromUtf8("actionSave")) self.actionImportNmap = QtWidgets.QAction(MainWindow) self.actionImportNmap.setObjectName(_fromUtf8("actionImportNmap")) self.actionSaveAs = QtWidgets.QAction(MainWindow) self.actionSaveAs.setObjectName(_fromUtf8("actionSaveAs")) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName(_fromUtf8("actionNew")) self.actionAddHosts = QtWidgets.QAction(MainWindow) self.actionAddHosts.setObjectName(_fromUtf8("actionAddHosts")) self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionOpen) self.menuFile.addAction(self.actionSave) self.menuFile.addAction(self.actionSaveAs) self.menuFile.addSeparator() self.menuFile.addAction(self.actionAddHosts) self.menuFile.addAction(self.actionImportNmap) self.menuFile.addSeparator() self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) #self.menubar.addAction(self.menuSettings.menuAction()) #self.actionSettings = QtWidgets.QAction(MainWindow) #self.actionSettings.setObjectName(_fromUtf8("getSettingsMenu")) #self.menuSettings.addAction(self.actionSettings) self.actionHelp = QtWidgets.QAction(MainWindow) self.actionHelp.setObjectName(_fromUtf8("getHelp")) self.menuHelp.addAction(self.actionHelp) self.menubar.addAction(self.menuHelp.menuAction()) self.actionConfig = QtWidgets.QAction(MainWindow) self.actionConfig.setObjectName(_fromUtf8("config")) self.menuHelp.addAction(self.actionConfig) self.menubar.addAction(self.menuHelp.menuAction())
Example #17
Source File: ui_mainwindow.py From learningPyQt5 with Apache License 2.0 | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(480, 602) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(140, 140, 151, 71)) font = QtGui.QFont() font.setPointSize(14) self.label.setFont(font) self.label.setObjectName("label") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 480, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuEdit = QtWidgets.QMenu(self.menubar) self.menuEdit.setObjectName("menuEdit") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.actionCopy = QtWidgets.QAction(MainWindow) self.actionCopy.setObjectName("actionCopy") self.actionCut = QtWidgets.QAction(MainWindow) self.actionCut.setObjectName("actionCut") self.actionPaste = QtWidgets.QAction(MainWindow) self.actionPaste.setObjectName("actionPaste") self.menuFile.addSeparator() self.menuFile.addAction(self.actionExit) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionCopy) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionCut) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionPaste) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuEdit.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #18
Source File: ui_mainwindow.py From learningPyQt5 with Apache License 2.0 | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(480, 602) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(30, 10, 71, 41)) font = QtGui.QFont() font.setPointSize(14) self.label.setFont(font) self.label.setObjectName("label") self.lineEdit = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit.setGeometry(QtCore.QRect(30, 70, 121, 31)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_2.setGeometry(QtCore.QRect(180, 70, 121, 31)) self.lineEdit_2.setObjectName("lineEdit_2") self.textEdit = QtWidgets.QTextEdit(self.centralwidget) self.textEdit.setGeometry(QtCore.QRect(30, 140, 131, 81)) self.textEdit.setObjectName("textEdit") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(30, 260, 113, 32)) self.pushButton.setObjectName("pushButton") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 480, 22)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuEdit = QtWidgets.QMenu(self.menubar) self.menuEdit.setObjectName("menuEdit") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.actionCopy = QtWidgets.QAction(MainWindow) self.actionCopy.setObjectName("actionCopy") self.actionCut = QtWidgets.QAction(MainWindow) self.actionCut.setObjectName("actionCut") self.actionPaste = QtWidgets.QAction(MainWindow) self.actionPaste.setObjectName("actionPaste") self.menuFile.addSeparator() self.menuFile.addAction(self.actionExit) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionCopy) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionCut) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionPaste) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuEdit.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #19
Source File: ui_mainwindow.py From learningPyQt5 with Apache License 2.0 | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) MainWindow.setMinimumSize(QtCore.QSize(800, 600)) MainWindow.setMaximumSize(QtCore.QSize(800, 600)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.button_ok = QtWidgets.QPushButton(self.centralwidget) self.button_ok.setGeometry(QtCore.QRect(260, 220, 230, 140)) self.button_ok.setMinimumSize(QtCore.QSize(230, 140)) self.button_ok.setMaximumSize(QtCore.QSize(230, 140)) font = QtGui.QFont() font.setPointSize(50) self.button_ok.setFont(font) self.button_ok.setFocusPolicy(QtCore.Qt.TabFocus) self.button_ok.setObjectName("button_ok") MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuHelp = QtWidgets.QMenu(self.menubar) self.menuHelp.setObjectName("menuHelp") MainWindow.setMenuBar(self.menubar) self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.actionCopy = QtWidgets.QAction(MainWindow) self.actionCopy.setObjectName("actionCopy") self.actionPaste = QtWidgets.QAction(MainWindow) self.actionPaste.setObjectName("actionPaste") self.actionCut = QtWidgets.QAction(MainWindow) self.actionCut.setObjectName("actionCut") self.actionHelp = QtWidgets.QAction(MainWindow) self.actionHelp.setObjectName("actionHelp") self.actionAbout = QtWidgets.QAction(MainWindow) self.actionAbout.setObjectName("actionAbout") self.action_query = QtWidgets.QAction(MainWindow) self.action_query.setObjectName("action_query") self.action_backupDB = QtWidgets.QAction(MainWindow) self.action_backupDB.setObjectName("action_backupDB") self.action_reset_mac = QtWidgets.QAction(MainWindow) self.action_reset_mac.setObjectName("action_reset_mac") self.menuFile.addSeparator() self.menuFile.addAction(self.actionExit) self.menuFile.addSeparator() self.menuHelp.addSeparator() self.menuHelp.addSeparator() self.menuHelp.addAction(self.actionAbout) self.menuHelp.addSeparator() self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #20
Source File: mainwindow_ui.py From kw_condition with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(429, 177) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.btnStart = QtWidgets.QPushButton(self.centralwidget) self.btnStart.setObjectName("btnStart") self.horizontalLayout.addWidget(self.btnStart) self.btnMakeExcel = QtWidgets.QPushButton(self.centralwidget) self.btnMakeExcel.setObjectName("btnMakeExcel") self.horizontalLayout.addWidget(self.btnMakeExcel) self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.btnYupjong = QtWidgets.QPushButton(self.centralwidget) self.btnYupjong.setObjectName("btnYupjong") self.horizontalLayout_2.addWidget(self.btnYupjong) self.btnCondition = QtWidgets.QPushButton(self.centralwidget) self.btnCondition.setObjectName("btnCondition") self.horizontalLayout_2.addWidget(self.btnCondition) self.gridLayout.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.btnJango = QtWidgets.QPushButton(self.centralwidget) self.btnJango.setObjectName("btnJango") self.horizontalLayout_3.addWidget(self.btnJango) self.btnChegyeol = QtWidgets.QPushButton(self.centralwidget) self.btnChegyeol.setObjectName("btnChegyeol") self.horizontalLayout_3.addWidget(self.btnChegyeol) self.gridLayout.addLayout(self.horizontalLayout_3, 2, 0, 1, 1) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.lineCmd = QtWidgets.QLineEdit(self.centralwidget) self.lineCmd.setObjectName("lineCmd") self.horizontalLayout_4.addWidget(self.lineCmd) self.btnRun = QtWidgets.QPushButton(self.centralwidget) self.btnRun.setObjectName("btnRun") self.horizontalLayout_4.addWidget(self.btnRun) self.gridLayout.addLayout(self.horizontalLayout_4, 3, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 429, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #21
Source File: bidseditor.py From bidscoin with GNU General Public License v3.0 | 4 votes |
def set_menu_and_status_bar(self): # Set the menus menubar = QtWidgets.QMenuBar(self.MainWindow) menuFile = QtWidgets.QMenu(menubar) menuFile.setTitle('File') menubar.addAction(menuFile.menuAction()) menuHelp = QtWidgets.QMenu(menubar) menuHelp.setTitle('Help') menubar.addAction(menuHelp.menuAction()) self.MainWindow.setMenuBar(menubar) # Set the file menu actions actionReload = QAction(self.MainWindow) actionReload.setText('Reset') actionReload.setStatusTip('Reload the BIDS-map from disk') actionReload.setShortcut('Ctrl+R') actionReload.triggered.connect(self.reload) menuFile.addAction(actionReload) actionSave = QAction(self.MainWindow) actionSave.setText('Save') actionSave.setStatusTip('Save the BIDS-map to disk') actionSave.setShortcut('Ctrl+S') actionSave.triggered.connect(self.save_bidsmap_to_file) menuFile.addAction(actionSave) actionExit = QAction(self.MainWindow) actionExit.setText('Exit') actionExit.setStatusTip('Exit the application') actionExit.setShortcut('Ctrl+X') actionExit.triggered.connect(self.exit_application) menuFile.addAction(actionExit) # Set help menu actions actionHelp = QAction(self.MainWindow) actionHelp.setText('Documentation') actionHelp.setStatusTip('Go to the online BIDScoin documentation') actionHelp.setShortcut('F1') actionHelp.triggered.connect(self.get_help) menuHelp.addAction(actionHelp) actionBidsHelp = QAction(self.MainWindow) actionBidsHelp.setText('BIDS specification') actionBidsHelp.setStatusTip('Go to the online BIDS specification documentation') actionBidsHelp.setShortcut('F2') actionBidsHelp.triggered.connect(self.get_bids_help) menuHelp.addAction(actionBidsHelp) actionAbout = QAction(self.MainWindow) actionAbout.setText('About BIDScoin') actionAbout.setStatusTip('Show information about the application') actionAbout.triggered.connect(self.show_about) menuHelp.addAction(actionAbout) # Set the statusbar statusbar = QtWidgets.QStatusBar(self.MainWindow) statusbar.setObjectName('statusbar') statusbar.setStatusTip('Statusbar') self.MainWindow.setStatusBar(statusbar)
Example #22
Source File: base_main_window.py From CvStudio with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(997, 795) MainWindow.setLayoutDirection(QtCore.Qt.LeftToRight) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setContentsMargins(5, 5, 5, 5) self.verticalLayout.setSpacing(5) self.verticalLayout.setObjectName("verticalLayout") self.widget = QtWidgets.QWidget(self.centralwidget) self.widget.setObjectName("widget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.frame_lateral_bar = QtWidgets.QFrame(self.widget) self.frame_lateral_bar.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_lateral_bar.setFrameShadow(QtWidgets.QFrame.Sunken) self.frame_lateral_bar.setObjectName("frame_lateral_bar") self.horizontalLayout.addWidget(self.frame_lateral_bar) self.tab_widget_manager = QtWidgets.QTabWidget(self.widget) self.tab_widget_manager.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) self.tab_widget_manager.setTabShape(QtWidgets.QTabWidget.Rounded) self.tab_widget_manager.setDocumentMode(False) self.tab_widget_manager.setTabsClosable(True) self.tab_widget_manager.setTabBarAutoHide(False) self.tab_widget_manager.setObjectName("tab_widget_manager") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.tab_widget_manager.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.tab_widget_manager.addTab(self.tab_2, "") self.horizontalLayout.addWidget(self.tab_widget_manager) self.verticalLayout.addWidget(self.widget) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 997, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.tab_widget_manager.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #23
Source File: demoMenuBar.py From Qt5-Python-GUI-Programming-Cookbook with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(463, 341) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(20, 110, 421, 20)) font = QtGui.QFont() font.setPointSize(12) self.label.setFont(font) self.label.setText("") self.label.setObjectName("label") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 463, 21)) self.menubar.setObjectName("menubar") self.menuDraw = QtWidgets.QMenu(self.menubar) self.menuDraw.setObjectName("menuDraw") self.menuProperties = QtWidgets.QMenu(self.menuDraw) self.menuProperties.setObjectName("menuProperties") self.menuEdit = QtWidgets.QMenu(self.menubar) self.menuEdit.setObjectName("menuEdit") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionDraw_Circle = QtWidgets.QAction(MainWindow) self.actionDraw_Circle.setObjectName("actionDraw_Circle") self.actionDraw_Rectangle = QtWidgets.QAction(MainWindow) self.actionDraw_Rectangle.setObjectName("actionDraw_Rectangle") self.actionDraw_Line = QtWidgets.QAction(MainWindow) self.actionDraw_Line.setObjectName("actionDraw_Line") self.actionPage_Setup = QtWidgets.QAction(MainWindow) self.actionPage_Setup.setObjectName("actionPage_Setup") self.actionSet_Password = QtWidgets.QAction(MainWindow) self.actionSet_Password.setCheckable(True) self.actionSet_Password.setObjectName("actionSet_Password") self.actionCut = QtWidgets.QAction(MainWindow) self.actionCut.setObjectName("actionCut") self.actionCopy = QtWidgets.QAction(MainWindow) self.actionCopy.setObjectName("actionCopy") self.actionPaste = QtWidgets.QAction(MainWindow) self.actionPaste.setObjectName("actionPaste") self.menuProperties.addAction(self.actionPage_Setup) self.menuProperties.addAction(self.actionSet_Password) self.menuDraw.addAction(self.actionDraw_Circle) self.menuDraw.addAction(self.actionDraw_Rectangle) self.menuDraw.addAction(self.actionDraw_Line) self.menuDraw.addSeparator() self.menuDraw.addAction(self.menuProperties.menuAction()) self.menuEdit.addAction(self.actionCut) self.menuEdit.addAction(self.actionCopy) self.menuEdit.addAction(self.actionPaste) self.menubar.addAction(self.menuDraw.menuAction()) self.menubar.addAction(self.menuEdit.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #24
Source File: Designer_Second_UI_layout.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(400, 300) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(0, 0, 391, 241)) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.horizontalLayoutWidget = QtWidgets.QWidget(self.tab) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 120, 361, 80)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.tab) self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 20, 160, 80)) self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.tabWidget.addTab(self.tab_2, "") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName("actionNew") self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #25
Source File: Designer_Second_UI_layout_button.py From Python-GUI-Programming-Cookbook-Third-Edition with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(400, 300) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(0, 0, 391, 241)) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.horizontalLayoutWidget = QtWidgets.QWidget(self.tab) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 120, 361, 80)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.pushButton = QtWidgets.QPushButton(self.horizontalLayoutWidget) self.pushButton.setObjectName("pushButton") self.horizontalLayout.addWidget(self.pushButton) self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.tab) self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 20, 160, 80)) self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label = QtWidgets.QLabel(self.horizontalLayoutWidget_2) self.label.setObjectName("label") self.horizontalLayout_2.addWidget(self.label) self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.tabWidget.addTab(self.tab_2, "") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionNew = QtWidgets.QAction(MainWindow) self.actionNew.setObjectName("actionNew") self.actionExit = QtWidgets.QAction(MainWindow) self.actionExit.setObjectName("actionExit") self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) self.pushButton.clicked.connect(self.label.clear) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #26
Source File: mainWindow.py From django-pyqt with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(428, 242) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName("verticalLayout") self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) self.stackedWidget.setObjectName("stackedWidget") self.page = QtWidgets.QWidget() self.page.setObjectName("page") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.page) self.verticalLayout_2.setObjectName("verticalLayout_2") self.username = QtWidgets.QLineEdit(self.page) self.username.setObjectName("username") self.verticalLayout_2.addWidget(self.username) self.password = QtWidgets.QLineEdit(self.page) self.password.setObjectName("password") self.verticalLayout_2.addWidget(self.password) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.addUserBtn = QtWidgets.QPushButton(self.page) self.addUserBtn.setObjectName("addUserBtn") self.horizontalLayout.addWidget(self.addUserBtn) self.authBtn = QtWidgets.QPushButton(self.page) self.authBtn.setObjectName("authBtn") self.horizontalLayout.addWidget(self.authBtn) self.verticalLayout_2.addLayout(self.horizontalLayout) self.stackedWidget.addWidget(self.page) self.page_2 = QtWidgets.QWidget() self.page_2.setObjectName("page_2") self.stackedWidget.addWidget(self.page_2) self.verticalLayout.addWidget(self.stackedWidget) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 428, 32)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #27
Source File: MainWindow.py From 15-minute-apps with MIT License | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(721, 333) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.srcLanguage = QtWidgets.QComboBox(self.centralwidget) self.srcLanguage.setObjectName("srcLanguage") self.verticalLayout.addWidget(self.srcLanguage) self.srcTextEdit = QtWidgets.QTextEdit(self.centralwidget) self.srcTextEdit.setObjectName("srcTextEdit") self.verticalLayout.addWidget(self.srcTextEdit) self.horizontalLayout.addLayout(self.verticalLayout) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.translateButton = QtWidgets.QPushButton(self.centralwidget) self.translateButton.setMinimumSize(QtCore.QSize(75, 50)) self.translateButton.setMaximumSize(QtCore.QSize(75, 50)) self.translateButton.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("images/flag.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.translateButton.setIcon(icon) self.translateButton.setIconSize(QtCore.QSize(75, 50)) self.translateButton.setObjectName("translateButton") self.verticalLayout_3.addWidget(self.translateButton) self.horizontalLayout.addLayout(self.verticalLayout_3) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.destTextEdit = QtWidgets.QTextEdit(self.centralwidget) self.destTextEdit.setObjectName("destTextEdit") self.verticalLayout_2.addWidget(self.destTextEdit) self.horizontalLayout.addLayout(self.verticalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 721, 22)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #28
Source File: main.py From ocelot with GNU General Public License v3.0 | 4 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1200, 800) MainWindow.setMinimumSize(QtCore.QSize(1150, 0)) self.central_widget = QtWidgets.QWidget(MainWindow) self.central_widget.setObjectName("central_widget") MainWindow.setCentralWidget(self.central_widget) self.statusBar = QtWidgets.QStatusBar(MainWindow) self.statusBar.setObjectName("statusBar") MainWindow.setStatusBar(self.statusBar) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 1200, 21)) self.menuBar.setObjectName("menuBar") self.menuFile = QtWidgets.QMenu(self.menuBar) self.menuFile.setObjectName("menuFile") self.menuEdit = QtWidgets.QMenu(self.menuBar) self.menuEdit.setObjectName("menuEdit") self.menuSimulations = QtWidgets.QMenu(self.menuBar) self.menuSimulations.setObjectName("menuSimulations") MainWindow.setMenuBar(self.menuBar) self.action_new_lattice = QtWidgets.QAction(MainWindow) self.action_new_lattice.setObjectName("action_new_lattice") self.action_open_lattice = QtWidgets.QAction(MainWindow) self.action_open_lattice.setObjectName("action_open_lattice") self.action_save_lattice = QtWidgets.QAction(MainWindow) self.action_save_lattice.setObjectName("action_save_lattice") self.action_exit = QtWidgets.QAction(MainWindow) self.action_exit.setObjectName("action_exit") self.action_edit_lattice = QtWidgets.QAction(MainWindow) self.action_edit_lattice.setObjectName("action_edit_lattice") self.action_calc_twiss = QtWidgets.QAction(MainWindow) self.action_calc_twiss.setObjectName("action_calc_twiss") self.menuFile.addAction(self.action_new_lattice) self.menuFile.addAction(self.action_open_lattice) self.menuFile.addAction(self.action_save_lattice) self.menuFile.addAction(self.action_exit) self.menuEdit.addAction(self.action_edit_lattice) self.menuSimulations.addAction(self.action_calc_twiss) self.menuBar.addAction(self.menuFile.menuAction()) self.menuBar.addAction(self.menuEdit.menuAction()) self.menuBar.addAction(self.menuSimulations.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #29
Source File: PyWeedGUI.py From pyweed with GNU Lesser General Public License v3.0 | 4 votes |
def configureMenu(self): # Create menuBar # see: http://doc.qt.io/qt-4.8/qmenubar.html # see: http://zetcode.com/gui/PyQt5/menusandtoolbars/ # see: https://pythonprogramming.net/menubar-pyqt-tutorial/ # see: http://www.dreamincode.net/forums/topic/261282-a-basic-pyqt-tutorial-notepad/ mainMenu = QtWidgets.QMenuBar() # mainMenu.setNativeMenuBar(False) fileMenu = mainMenu.addMenu('&File') saveSummaryAction = QtWidgets.QAction("Save Summary", self.mainWindow) saveSummaryAction.triggered.connect(self.saveSummary) fileMenu.addAction(saveSummaryAction) loadSummaryAction = QtWidgets.QAction("Load Summary", self.mainWindow) loadSummaryAction.triggered.connect(self.loadSummary) fileMenu.addAction(loadSummaryAction) quitAction = QtWidgets.QAction("&Quit", self.mainWindow) quitAction.setShortcut("Ctrl+Q") quitAction.triggered.connect(self.closeApplication) fileMenu.addAction(quitAction) viewMenu = mainMenu.addMenu('View') showConsoleAction = QtWidgets.QAction("Show Python Console", self) showConsoleAction.triggered.connect(self.console.show) viewMenu.addAction(showConsoleAction) showLogsAction = QtWidgets.QAction("Show Logs", self) showLogsAction.triggered.connect(self.loggingDialog.show) viewMenu.addAction(showLogsAction) optionsMenu = mainMenu.addMenu('Options') showPreferencesAction = QtWidgets.QAction("Preferences", self) showPreferencesAction.triggered.connect(self.preferencesDialog.exec_) optionsMenu.addAction(showPreferencesAction) helpMenu = mainMenu.addMenu('Help') aboutPyweedAction = QtWidgets.QAction("&About PYWEED", self) aboutPyweedAction.triggered.connect(self.showAboutDialog) helpMenu.addAction(aboutPyweedAction) helpMenu.addSeparator() self.mainWindow.setMenuBar(mainMenu) # self.waveformsDialog.setMenuBar(mainMenu)