Python PySide2.QtWidgets.QVBoxLayout() Examples
The following are 30
code examples of PySide2.QtWidgets.QVBoxLayout().
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
PySide2.QtWidgets
, or try the search function
.
Example #1
Source File: universal_tool_template_1100.py From universal_tool_template.py with MIT License | 7 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #2
Source File: multiLineInputDialog_UI_pyside2.py From anima with MIT License | 7 votes |
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(400, 300) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.label = QtWidgets.QLabel(Dialog) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.plainTextEdit = QtWidgets.QPlainTextEdit(Dialog) self.plainTextEdit.setObjectName("plainTextEdit") self.verticalLayout.addWidget(self.plainTextEdit) self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setObjectName("buttonBox") self.verticalLayout.addWidget(self.buttonBox) self.retranslateUi(Dialog) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
Example #3
Source File: GearBox_template_1010.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #4
Source File: twitter_dapp.py From Hands-On-Blockchain-for-Python-Developers with MIT License | 6 votes |
def __init__(self): super(TwitterDapp, self).__init__() self.createPrivateKeyGroupBox() self.createWritingTweetGroupBox() self.createTweetsGroupBox() self.createBookmarkGroupBox() self.setWindowTitle("Twitter-Like Blockchain Dapp") mainLayout = QtWidgets.QVBoxLayout() mainLayout.addWidget(self.private_key_group_box) mainLayout.addLayout(self.write_button_layout) mainLayout.addWidget(self.tweets_group_box) mainLayout.addWidget(self.bookmark_group_box) self.setLayout(mainLayout) self.web3_read_tweets_thread = Web3ReadTweetsThread() self.web3_read_tweets_thread.fetched_posts.connect(self.fillPosts) self.web3_write_a_tweet_thread = Web3WriteATweetThread() self.web3_write_a_tweet_thread.write_a_tweet.connect(self.successfullyWriteATweet)
Example #5
Source File: twitter_dapp.py From Hands-On-Blockchain-for-Python-Developers with MIT License | 6 votes |
def createTweetsGroupBox(self): self.tweets_group_box = QtWidgets.QGroupBox("Tweets") self.account_address = QtWidgets.QLineEdit() self.fetch_button = QtWidgets.QPushButton("Fetch") self.add_to_bookmark_button = QtWidgets.QPushButton("Bookmark it!") self.connect(self.fetch_button, QtCore.SIGNAL('clicked()'), self.fetchTweets) self.connect(self.add_to_bookmark_button, QtCore.SIGNAL('clicked()'), self.bookmarkAddress) account_address_layout = QtWidgets.QHBoxLayout() account_address_layout.addWidget(self.account_address) account_address_layout.addWidget(self.fetch_button) account_address_layout.addWidget(self.add_to_bookmark_button) self.tweets_layout = QtWidgets.QVBoxLayout() self.tweets_main_layout = QtWidgets.QVBoxLayout() self.tweets_main_layout.addWidget(QtWidgets.QLabel("Address:")) self.tweets_main_layout.addLayout(account_address_layout) self.tweets_main_layout.addSpacing(20) self.tweets_main_layout.addLayout(self.tweets_layout) self.tweets_group_box.setLayout(self.tweets_main_layout)
Example #6
Source File: button_with_sizepolicy.py From Hands-On-Blockchain-for-Python-Developers with MIT License | 6 votes |
def __init__(self): super(ButtonWithSizePolicy, self).__init__() button1 = QPushButton("button default") button2 = QPushButton("button maximum") button2.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum) button3 = QPushButton("button preferred") button3.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) button4 = QPushButton("button expanding") button4.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) button5 = QPushButton("button minimum") button5.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) button6 = QPushButton("button minimum expanding") button6.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding) layout = QVBoxLayout() layout.addWidget(button1) layout.addWidget(button2) layout.addWidget(button3) layout.addWidget(button4) layout.addWidget(button5) layout.addWidget(button6) self.setLayout(layout)
Example #7
Source File: dialog.py From hotbox_designer with BSD 3-Clause Clear License | 6 votes |
def __init__(self, command, parent=None): super(CommandDisplayDialog, self).__init__(parent) self.setWindowTitle("Command") self.text = QtWidgets.QTextEdit() self.text.setReadOnly(True) self.text.setPlainText(command) self.ok = QtWidgets.QPushButton('ok') self.ok.released.connect(self.accept) self.button_layout = QtWidgets.QHBoxLayout() self.button_layout.setContentsMargins(0, 0, 0, 0) self.button_layout.addStretch(1) self.button_layout.addWidget(self.ok) self.layout = QtWidgets.QVBoxLayout(self) self.layout.addWidget(self.text) self.layout.addLayout(self.button_layout)
Example #8
Source File: manager.py From hotbox_designer with BSD 3-Clause Clear License | 6 votes |
def __init__(self, parent=None): super(HotboxGeneralInfosWidget, self).__init__(parent) self.setFixedWidth(200) self.label = QtWidgets.QLabel() self.open_command = CommandButton('show') self.close_command = CommandButton('hide') self.switch_command = CommandButton('switch') self.layout = QtWidgets.QVBoxLayout(self) self.layout.setContentsMargins(0, 0, 0, 0) self.layout.setSpacing(0) self.layout.addWidget(Title('Infos')) self.layout.addSpacing(8) self.layout.addWidget(self.label) self.layout.addSpacing(8) self.layout.addStretch(1) self.layout.addWidget(Title('Commands')) self.layout.addSpacing(8) self.layout.addWidget(self.open_command) self.layout.addWidget(self.close_command) self.layout.addWidget(self.switch_command)
Example #9
Source File: strings_view.py From angr-management with BSD 2-Clause "Simplified" License | 6 votes |
def _init_widgets(self): lbl_function = QLabel(self) lbl_function.setText("Function") self._function_list = QFunctionComboBox(show_all_functions=True, selection_callback=self._on_function_selected, parent=self ) function_layout = QHBoxLayout() function_layout.addWidget(lbl_function) function_layout.addWidget(self._function_list) self._string_table = QStringTable(self, selection_callback=self._on_string_selected) layout = QVBoxLayout() layout.addLayout(function_layout) layout.addWidget(self._string_table) layout.setContentsMargins(0, 0, 0, 0) self.setLayout(layout)
Example #10
Source File: xref.py From angr-management with BSD 2-Clause "Simplified" License | 6 votes |
def _init_widgets(self): # xref viewer xref_viewer = QXRefViewer( addr=self._addr, variable_manager=self._variable_manager, variable=self._variable, xrefs_manager=self._xrefs_manager, dst_addr=self._dst_addr, instance=self._instance, disassembly_view=self._disassembly_view, parent=self, ) # buttons btn_ok = QPushButton('OK') btn_close = QPushButton('Close') btn_close.clicked.connect(self._on_close_clicked) buttons_layout = QHBoxLayout() buttons_layout.addWidget(btn_ok) buttons_layout.addWidget(btn_close) layout = QVBoxLayout() layout.addWidget(xref_viewer) layout.addLayout(buttons_layout) self.setLayout(layout)
Example #11
Source File: button_and_long_process.py From Hands-On-Blockchain-for-Python-Developers with MIT License | 6 votes |
def __init__(self): super(ButtonAndLongProcess, self).__init__() self.button = QPushButton("button") self.button.clicked.connect(self.buttonClicked) self.label = QLabel("label: before clicked") layout = QVBoxLayout() layout.addWidget(self.button) layout.addWidget(self.label) self.setLayout(layout) self.long_process_thread = LongProcessThread() self.long_process_thread.transaction.connect(self.afterLongProcess)
Example #12
Source File: MyWindow_ui.py From MayaDev with MIT License | 6 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(300, 150) self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.verticalLayout.setObjectName("verticalLayout") self.btnCreateSphere = QtWidgets.QPushButton(Form) self.btnCreateSphere.setObjectName("btnCreateSphere") self.verticalLayout.addWidget(self.btnCreateSphere) self.btnCallCppPlugin = QtWidgets.QPushButton(Form) self.btnCallCppPlugin.setObjectName("btnCallCppPlugin") self.verticalLayout.addWidget(self.btnCallCppPlugin) self.btnCallCSPlugin = QtWidgets.QPushButton(Form) self.btnCallCSPlugin.setObjectName("btnCallCSPlugin") self.verticalLayout.addWidget(self.btnCallCSPlugin) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #13
Source File: universal_tool_template_1010.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #14
Source File: universal_tool_template_v8.1.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #15
Source File: universal_tool_template_1000.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #16
Source File: universal_tool_template_0904.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #17
Source File: universal_tool_template_0803.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #18
Source File: BaseTab.py From pyrdp with GNU General Public License v3.0 | 6 votes |
def __init__(self, viewer: QRemoteDesktop, parent: QWidget = None): """ :param viewer: the RDP viewer widget :param parent: the parent widget """ super().__init__(parent, Qt.WindowFlags()) self.widget = viewer self.writeInCaps = False self.text = QTextEdit() self.text.setReadOnly(True) self.text.setMinimumHeight(150) self.log = logging.getLogger(LOGGER_NAMES.PLAYER) self.tabLayout = QVBoxLayout() self.scrollViewer = QScrollArea() self.scrollViewer.setWidget(self.widget) self.tabLayout.addWidget(self.scrollViewer, 10) self.tabLayout.addWidget(self.text, 2) self.setLayout(self.tabLayout)
Example #19
Source File: universal_tool_template_0903.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #20
Source File: universal_tool_template_1110.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #21
Source File: universal_tool_template_1116.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #22
Source File: universal_tool_template_1112.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #23
Source File: universal_tool_template_1020.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #24
Source File: universal_tool_template_1115.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #25
Source File: universal_tool_template_1115.py From universal_tool_template.py with MIT License | 6 votes |
def quickMsg(self, msg, block=1): tmpMsg = QtWidgets.QMessageBox(self) # for simple msg that no need for translation tmpMsg.setWindowTitle("Info") lineCnt = len(msg.split('\n')) if lineCnt > 25: scroll = QtWidgets.QScrollArea() scroll.setWidgetResizable(1) content = QtWidgets.QWidget() scroll.setWidget(content) layout = QtWidgets.QVBoxLayout(content) tmpLabel = QtWidgets.QLabel(msg) tmpLabel.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse) layout.addWidget(tmpLabel) tmpMsg.layout().addWidget(scroll, 0, 0, 1, tmpMsg.layout().columnCount()) tmpMsg.setStyleSheet("QScrollArea{min-width:600 px; min-height: 400px}") else: tmpMsg.setText(msg) if block == 0: tmpMsg.setWindowModality( QtCore.Qt.NonModal ) tmpMsg.addButton("OK",QtWidgets.QMessageBox.YesRole) if block: tmpMsg.exec_() else: tmpMsg.show()
Example #26
Source File: UITranslator.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #27
Source File: ui_tabitemwindow.py From Il2cppSpy with MIT License | 6 votes |
def setupUi(self, TabItemWindow): TabItemWindow.setObjectName("TabItemWindow") TabItemWindow.resize(400, 300) self.verticalLayout = QtWidgets.QVBoxLayout(TabItemWindow) self.verticalLayout.setSpacing(0) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.tableWidget = QtWidgets.QTableWidget(TabItemWindow) self.tableWidget.setColumnCount(1) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(1) self.tableWidget.setRowCount(0) self.tableWidget.horizontalHeader().setVisible(False) self.tableWidget.horizontalHeader().setStretchLastSection(True) self.tableWidget.verticalHeader().setDefaultSectionSize(24) self.tableWidget.verticalHeader().setHighlightSections(False) self.verticalLayout.addWidget(self.tableWidget) self.retranslateUi(TabItemWindow) QtCore.QMetaObject.connectSlotsByName(TabItemWindow)
Example #28
Source File: pdg_mutagen_ui.py From pdg_mutagen with MIT License | 5 votes |
def __init__(self, parent=None): super(MutagenInterface, self).__init__(parent) ####initial startup layout #create layout for main QWidget self._layout = QtWidgets.QVBoxLayout() self._layout.setContentsMargins(0,0,0,0) self.setLayout(self._layout) # Set the stylesheet self.setStyleSheet(glob_stylesheet) self.setProperty('BGFrame', True) #set to startup interface self._startup_interface = StartupInterface(self) self._layout.addWidget(self._startup_interface) #startup interface class
Example #29
Source File: task_picker_dialog_UI_pyside2.py From anima with MIT License | 5 votes |
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(629, 567) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setObjectName("buttonBox") self.verticalLayout.addWidget(self.buttonBox) self.retranslateUi(Dialog) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
Example #30
Source File: logic_settings_window.py From randovania with GNU General Public License v3.0 | 5 votes |
def setup_location_pool_elements(self): self.randomization_mode_combo.setItemData(0, RandomizationMode.FULL) self.randomization_mode_combo.setItemData(1, RandomizationMode.MAJOR_MINOR_SPLIT) self.randomization_mode_combo.currentIndexChanged.connect(self._on_update_randomization_mode) game_description = default_prime2_game_description() world_to_group = {} self._location_pool_for_node = {} for world in game_description.world_list.worlds: for is_dark_world in [False, True]: group_box = QGroupBox(self.excluded_locations_area_contents) group_box.setTitle(world.correct_name(is_dark_world)) vertical_layout = QVBoxLayout(group_box) vertical_layout.setContentsMargins(8, 4, 8, 4) vertical_layout.setSpacing(2) group_box.vertical_layout = vertical_layout world_to_group[world.correct_name(is_dark_world)] = group_box self.excluded_locations_area_layout.addWidget(group_box) for world, area, node in game_description.world_list.all_worlds_areas_nodes: if not isinstance(node, PickupNode): continue group_box = world_to_group[world.correct_name(area.in_dark_aether)] check = QtWidgets.QCheckBox(group_box) check.setText(game_description.world_list.node_name(node)) check.node = node check.stateChanged.connect(functools.partial(self._on_check_location, check)) group_box.vertical_layout.addWidget(check) self._location_pool_for_node[node] = check