Python PyQt5.QtWidgets.QStackedLayout() Examples
The following are 23
code examples of PyQt5.QtWidgets.QStackedLayout().
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: hexteditor.py From guppy-proxy with MIT License | 8 votes |
def __init__(self, *args, **kwargs): QWidget.__init__(self, *args, **kwargs) self.headers = Headers() self.data = b'' self.view = 0 self.setLayout(QVBoxLayout()) self.layout().setContentsMargins(0, 0, 0, 0) self.stack = QStackedLayout() self.stack.setContentsMargins(0, 0, 0, 0) self.nopp_widg = QLabel("No pretty version available") self.stack.addWidget(self.nopp_widg) self.highlighted_widg = QTextEdit() self.highlighted_widg.setReadOnly(True) self.stack.addWidget(self.highlighted_widg) self.json_widg = QTextEdit() self.json_widg.setReadOnly(True) self.stack.addWidget(self.json_widg) self.htmlxml_widg = QTextEdit() self.htmlxml_widg.setReadOnly(True) self.stack.addWidget(self.htmlxml_widg) self.selector = QComboBox() self.selector.addItem("Manually Select Printer", self.VIEW_NONE) self.selector.addItem("Highlighted", self.VIEW_HIGHLIGHTED) self.selector.addItem("JSON", self.VIEW_JSON) self.selector.addItem("HTML/XML", self.VIEW_HTMLXML) self.selector.currentIndexChanged.connect(self._combo_changed) self.layout().addWidget(self.selector) self.layout().addLayout(self.stack)
Example #2
Source File: gmd_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = GmdTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.table_view.setWordWrap(True) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #3
Source File: sgpa_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = SgpaTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #4
Source File: lbm_base_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = LbmBaseTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #5
Source File: wep_wsl_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(WepWslEntry.fields(), self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #6
Source File: bbtbl_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(columns, self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #7
Source File: lbm_skill_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = LbmSkillTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #8
Source File: arm_up_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(columns, self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #9
Source File: wep_saxe_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(WepSaxeEntry.fields(), self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #10
Source File: kire_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(KireEntry.fields(), self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #11
Source File: sed_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = SedTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #12
Source File: wep_glan_editor.py From mhw_armor_edit with The Unlicense | 8 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = StructTableModel(WepGlanEntry.fields(), self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #13
Source File: reqlist.py From guppy-proxy with MIT License | 7 votes |
def __init__(self, *args, **kwargs): QWidget.__init__(self, *args, **kwargs) layout = QHBoxLayout() confirm = QToolButton() confirm.setText("OK") confirm.setToolTip("Apply the entered filter") self.field_entry = get_field_entry() # stack containing widgets for string, k/v, date, daterange self.str_cmp_entry = StringCmpWidget() self.kv_cmp_entry = StringKVWidget() self.inv_entry = QCheckBox("inv") # date # daterange self.entry_layout = QStackedLayout() self.entry_layout.setContentsMargins(0, 0, 0, 0) self.current_entry = 0 self.entry_layout.addWidget(self.str_cmp_entry) self.entry_layout.addWidget(self.kv_cmp_entry) # add date # 2 # add daterange # 3 confirm.clicked.connect(self.confirm_entry) self.str_cmp_entry.returnPressed.connect(self.confirm_entry) self.kv_cmp_entry.returnPressed.connect(self.confirm_entry) self.field_entry.currentIndexChanged.connect(self._display_value_widget) layout.addWidget(confirm) layout.addWidget(self.inv_entry) layout.addWidget(self.field_entry) layout.addLayout(self.entry_layout) self.setLayout(layout) self.setContentsMargins(0, 0, 0, 0) self._display_value_widget()
Example #14
Source File: skill_data_editor.py From mhw_armor_edit with The Unlicense | 7 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = SkillDataModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #15
Source File: mkex_editor.py From mhw_armor_edit with The Unlicense | 7 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = TableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #16
Source File: skill_point_data_editor.py From mhw_armor_edit with The Unlicense | 7 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = SkillPointDataModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #17
Source File: reqlist.py From guppy-proxy with MIT License | 7 votes |
def __init__(self, client, repeater_widget=None, macro_widget=None, *args, **kwargs): QWidget.__init__(self, *args, **kwargs) self.allow_save = False self.client = client self.repeater_widget = repeater_widget self.macro_widget = macro_widget self.query = [] self.req_view_widget = None self.setLayout(QStackedLayout()) self.layout().setContentsMargins(0, 0, 0, 0) self.tableModel = ReqListModel(self.client) self.tableView = QTableView() self.tableView.setModel(self.tableModel) self.tableView.verticalHeader().setSectionResizeMode(QHeaderView.ResizeToContents) self.tableView.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents) self.tableView.verticalHeader().hide() self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows) #self.tableView.setSelectionMode(QAbstractItemView.SingleSelection) self.tableView.horizontalHeader().setStretchLastSection(True) self.tableView.selectionModel().selectionChanged.connect(self.on_select_change) self.tableModel.dataChanged.connect(self._paint_view) self.tableModel.rowsInserted.connect(self._on_rows_inserted) self.requestsChanged.connect(self.set_requests) self.requestsSelected.connect(self._updated_selected_request) self.selected_reqs = [] self.layout().addWidget(self.tableView) self.layout().addWidget(QLabel("<b>Loading requests from data file...</b>"))
Example #18
Source File: reqlist.py From guppy-proxy with MIT License | 6 votes |
def __init__(self, *args, **kwargs): QWidget.__init__(self, *args, **kwargs) self.current_entry = 0 self.max_entries = 2 self.text_entry = TextFilterEntry() dropdown_entry = DropdownFilterEntry() self.text_entry.filterEntered.connect(self.filterEntered) dropdown_entry.filterEntered.connect(self.filterEntered) self.entry_layout = QStackedLayout() self.entry_layout.addWidget(dropdown_entry) self.entry_layout.addWidget(self.text_entry) swap_button = QToolButton() swap_button.setText(">") swap_button.setToolTip("Switch between dropdown and text entry") swap_button.clicked.connect(self.next_entry) hlayout = QHBoxLayout() hlayout.addWidget(swap_button) hlayout.addLayout(self.entry_layout) self.setLayout(hlayout) self.layout().setContentsMargins(0, 0, 0, 0) self.layout().setSpacing(0)
Example #19
Source File: gui.py From ripr with MIT License | 6 votes |
def __init__(self, emuchunks=None): self.qtAvailable = qtAvailable if not qtAvailable: return super(riprWidget, self).__init__('ripr') self.emuchunks = emuchunks self._table = riprTable(emuchunks=emuchunks) self.setLayout(QtWidgets.QStackedLayout()) self.layout().addWidget(self._table) self.setObjectName('BNPlugin_ripr')
Example #20
Source File: yarascan.py From BinjaDock with MIT License | 2 votes |
def __init__(self): super(YaraWidget, self).__init__('Yara') self._rules = yara.compile(filepath=core.BNGetUserPluginDirectory() + SIG_FILE) self._table = QtWidgets.QTableWidget() self._table.setColumnCount(2) self._table.setHorizontalHeaderLabels(['Offset', 'Signature']) self._table.horizontalHeader().setStretchLastSection(True) self._table.verticalHeader().setVisible(False) self.setLayout(QtWidgets.QStackedLayout()) self.layout().addWidget(self._table) self.setObjectName('BNPlugin_Yara') # self.addToolMenuAction("&Yara about", lambda: log_info('Yara scan!'))
Example #21
Source File: main-stack-pages.py From python-examples with MIT License | 2 votes |
def __init__(self): super().__init__() self.stack = QtWidgets.QStackedLayout(self) self.stack1 = FirstWidget(self) self.stack2 = SecondWidget(self) self.stack.addWidget(self.stack1) self.stack.addWidget(self.stack2) self.show()
Example #22
Source File: otomo_armor_editor.py From mhw_armor_edit with The Unlicense | 1 votes |
def __init__(self, parent=None): super().__init__(parent) self.model = None self.table_model = OtomoArmorTableModel(self) self.table_view = SortFilterTableView(self) self.table_view.setModel(self.table_model) self.setLayout(QStackedLayout(self)) self.layout().addWidget(self.table_view)
Example #23
Source File: bar.py From qutebrowser with GNU General Public License v3.0 | 1 votes |
def __init__(self, *, win_id, private, parent=None): super().__init__(parent) self.setObjectName(self.__class__.__name__) self.setAttribute(Qt.WA_StyledBackground) stylesheet.set_register(self) self.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Fixed) self._win_id = win_id self._color_flags = ColorFlags() self._color_flags.private = private self._hbox = QHBoxLayout(self) self._set_hbox_padding() self._hbox.setSpacing(5) self._stack = QStackedLayout() self._hbox.addLayout(self._stack) self._stack.setContentsMargins(0, 0, 0, 0) self.cmd = command.Command(private=private, win_id=win_id) self._stack.addWidget(self.cmd) objreg.register('status-command', self.cmd, scope='window', window=win_id) self.txt = textwidget.Text() self._stack.addWidget(self.txt) self.cmd.show_cmd.connect(self._show_cmd_widget) self.cmd.hide_cmd.connect(self._hide_cmd_widget) self._hide_cmd_widget() self.url = url.UrlText() self.percentage = percentage.Percentage() self.backforward = backforward.Backforward() self.tabindex = tabindex.TabIndex() self.keystring = keystring.KeyString() self.prog = progress.Progress(self) self._draw_widgets() config.instance.changed.connect(self._on_config_changed) QTimer.singleShot(0, self.maybe_hide)