本文整理汇总了Python中PyQt5.QtWidgets.QVBoxLayout.setMenuBar方法的典型用法代码示例。如果您正苦于以下问题:Python QVBoxLayout.setMenuBar方法的具体用法?Python QVBoxLayout.setMenuBar怎么用?Python QVBoxLayout.setMenuBar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QVBoxLayout
的用法示例。
在下文中一共展示了QVBoxLayout.setMenuBar方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtWidgets import QVBoxLayout [as 别名]
# 或者: from PyQt5.QtWidgets.QVBoxLayout import setMenuBar [as 别名]
def __init__(self):
super(Dialog, self).__init__()
self.createMenu()
self.widget_register_url()
self.widget_download()
self.thread_download = threading.Thread( group=None, target=self.run_downloader, name=None, args=(), kwargs={}, daemon=True )
self.running = False
bigEditor = QTextEdit()
bigEditor.setPlainText("This widget takes up all the remaining space "
"in the top-level layout.")
buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
mainLayout = QVBoxLayout()
mainLayout.setMenuBar(self.menuBar)
mainLayout.addWidget(self.form_register_url)
mainLayout.addWidget(self.form_download_urls)
self.setLayout(mainLayout)
self.setWindowTitle("Bamboodl")
示例2: __init__
# 需要导入模块: from PyQt5.QtWidgets import QVBoxLayout [as 别名]
# 或者: from PyQt5.QtWidgets.QVBoxLayout import setMenuBar [as 别名]
def __init__(self):
super(Dialog, self).__init__()
self.createMenu()
self.createHorizontalGroupBox()
self.createGridGroupBox()
self.createFormGroupBox()
bigEditor = QTextEdit()
bigEditor.setPlainText("This widget takes up all the remaining space "
"in the top-level layout.")
buttonBox = QDialogButtonBox(
QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
mainLayout = QVBoxLayout()
mainLayout.setMenuBar(self.menuBar)
mainLayout.addWidget(self.horizontalGroupBox)
mainLayout.addWidget(self.gridGroupBox)
mainLayout.addWidget(self.formGroupBox)
mainLayout.addWidget(bigEditor)
mainLayout.addWidget(buttonBox)
self.setLayout(mainLayout)
self.setWindowTitle("Basic Layouts")
示例3: initUI
# 需要导入模块: from PyQt5.QtWidgets import QVBoxLayout [as 别名]
# 或者: from PyQt5.QtWidgets.QVBoxLayout import setMenuBar [as 别名]
def initUI(self):
#GrBox1
GrBox=QGroupBox()
vbox = QHBoxLayout(self)
vbox.setContentsMargins(0,0,0,0)
#GrBox.setFixedHeight(60)
pathButton = QPushButton(QIcon('icons\\pack.png'),"Папка")
pathButton.setIconSize(QSize(25,25))
pathButton.setVisible(True)
pathLable=QLineEdit()
#pathLable.setReadOnly(True)
subPathCheck=QCheckBox()
subPathCheck.setText("Подпапки")
subPathCheck.setCheckState(0)
vbox.addWidget(pathLable)
vbox.addWidget(subPathCheck)
vbox.addWidget(pathButton)
GrBox.setLayout(vbox)
#/GrBox1
#FilesTable
FilesTable=QListView(self)
FilesTable.setToolTip("Список файлов, выберите нужные файлы для обработки,\nдля просмотра файла дважды щелкните по нему")
FilesTableModel = QStandardItemModel()
FilesTable.setModel(FilesTableModel)
#/FilesTable
#mainLayout
mainLayout = QVBoxLayout()
mainLayout.setContentsMargins(0,0,0,0)
mainLayout.setMenuBar(GrBox)
mainLayout.addWidget(FilesTable)
#/mainLayout
#self
self.setLayout(mainLayout)
self.path=pathLable.text()
self.pathLable=pathLable
self.subPathCheck=subPathCheck
self.FilesTableModel = FilesTableModel
#/self
#connections
pathLable.textChanged.connect(self.setPath)
pathButton.clicked.connect(self.selectPath)
subPathCheck.clicked.connect(self.setPath)
FilesTableModel.itemChanged.connect(self.ChangeFilesList)
FilesTable.doubleClicked.connect(self.openFile)
示例4: __init__
# 需要导入模块: from PyQt5.QtWidgets import QVBoxLayout [as 别名]
# 或者: from PyQt5.QtWidgets.QVBoxLayout import setMenuBar [as 别名]
def __init__(self):
super(QMW, self).__init__()
self.tableau = TableauQt("x")
self.simple = False # doit-on faire un tableau simplifié
# symboles unicode 2a7d et 2a7e voir
# http://fr.wikipedia.org/wiki/Table_des_caract%C3%A8res_Unicode_%282000-2FFF%29#Fl.C3.A8ches
self.inequations = {"⩽0": "-0", "<0": "--", "⩾0": "+0", ">0": "++"}
self.createMenu()
self.createHorizontalGroupBox()
self.createFormGroupBox()
self.createBoundBox()
self.createSolutionBox()
self.exitAct = QAction(
"E&xit", self, shortcut="Ctrl+Q", statusTip="Sortir de l'application", triggered=self.close
)
bigEditor = QTextEdit()
bigEditor.setPlainText("Création de la sortie latex ici pour un copier/coller ")
buttonBox = QDialogButtonBox(QDialogButtonBox.Ok) # | QDialogButtonBox.Cancel
buttonBox.accepted.connect(self.close)
widget = QWidget()
self.setCentralWidget(widget)
mainLayout = QVBoxLayout()
mainLayout.setMenuBar(self.menuBar)
mainLayout.addWidget(self.formGroupBox)
mainLayout.addWidget(self.BoundBox)
mainLayout.addWidget(bigEditor)
mainLayout.addWidget(self.solGroupBox)
mainLayout.addWidget(self.horizontalGroupBox)
mainLayout.addWidget(buttonBox)
widget.setLayout(mainLayout)
self.bigEditor = bigEditor
self.setWindowTitle("Tableau de signe")
示例5: initUI
# 需要导入模块: from PyQt5.QtWidgets import QVBoxLayout [as 别名]
# 或者: from PyQt5.QtWidgets.QVBoxLayout import setMenuBar [as 别名]
def initUI(self):
#ReplaceModel
ReplaceModel=QStandardItemModel()
ReplaceModel.setColumnCount(3)
ReplaceModel.setHorizontalHeaderLabels(["Найти","Заменить на","Настройки"])
#/ReplaceModel
#replaceTable
replaceTable = QTableView(self)
#replaceTable.setToolTip("Таблица поиска и замены,\nдобавьте строку и заполните текст для поиска и замены,\nвы также можете выбрать индивидуальные опции поиска для данной строки")
#replaceTable.horizontalHeader().setToolTip("Найти - Текст для поиска\nЗаменить - Текст замены\nЗн. - Подстановочные знаки\nЦв. - Выделение цветом\nЖ - Выделение жирным шрифтом\nН - Изменять надписи\nWA - Изменять объкты WordArt")
replaceTable.setModel(ReplaceModel)
replaceTable.horizontalHeader().setSectionResizeMode(1, QHeaderView.Stretch)
replaceTable.horizontalHeader().setSectionResizeMode(2, QHeaderView.ResizeToContents)
replaceTable.horizontalHeader().setSectionResizeMode(3, QHeaderView.ResizeToContents)
"""replaceTable.horizontalHeader().setSectionResizeMode(4, QHeaderView.ResizeToContents)
replaceTable.horizontalHeader().setSectionResizeMode(5, QHeaderView.ResizeToContents)
replaceTable.horizontalHeader().setSectionResizeMode(6, QHeaderView.ResizeToContents)"""
replaceTable.horizontalHeader().resizeSection(0,500)
replaceTable.setItemDelegateForColumn(0,PlainTextEditDelegate(replaceTable))
replaceTable.setItemDelegateForColumn(1,PlainTextEditDelegate(replaceTable))
#btnDeleg=ButtonDelegate(replaceTable)
#btnDeleg.clicked.connect(self.setItemOpt)
#replaceTable.clicked.connect(self.setItemOpt)
#replaceTable.setItemDelegateForColumn(2,btnDeleg)
#replaceTable.setItemDelegateForColumn(6,CheckBoxDelegate(replaceTable))
#/replaceTable
#buttonBox
sklonPadejBtn=QPushButton("Просклонять")
addRowBtn=QPushButton("Добавить строку")
delRowBtn=QPushButton("Удалить строку")
clearTable=QPushButton("Очистить")
buttonBox = QDialogButtonBox(Qt.Horizontal)
buttonBox.addButton(sklonPadejBtn, QDialogButtonBox.ActionRole)
buttonBox.addButton(addRowBtn, QDialogButtonBox.ActionRole)
buttonBox.addButton(delRowBtn, QDialogButtonBox.ActionRole)
buttonBox.addButton(clearTable, QDialogButtonBox.ActionRole)
#/buttonBox
#mainLayout
mainLayout = QVBoxLayout()
mainLayout.setContentsMargins(0,0,0,0)
self.optionWdgt=Options()
mainLayout.setMenuBar(self.optionWdgt)
mainLayout.addWidget(replaceTable)
mainLayout.addWidget(buttonBox)
#/mainLayout
#self
self.setLayout(mainLayout)
self.ReplaceModel=ReplaceModel
self.replaceTable=replaceTable
#/self
#connections
sklonPadejBtn.clicked.connect(self.addSklonenie)
addRowBtn.clicked.connect(self.addRow)
delRowBtn.clicked.connect(self.delRow)
clearTable.clicked.connect(self.clearReplaceTable)
ReplaceModel.itemChanged.connect(self.ChangeReplaceList)