Python PySide2.QtWidgets.QDockWidget() Examples
The following are 5
code examples of PySide2.QtWidgets.QDockWidget().
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: MenusTools.py From PyAero with MIT License | 6 votes |
def createDocks(self): self.parent.messagedock = QtWidgets.QDockWidget(self.parent) self.parent.messagedock. \ setFeatures(QtWidgets.QDockWidget.DockWidgetMovable | QtWidgets.QDockWidget.DockWidgetFloatable) self.parent.messagedock.setWindowTitle('Messages') self.parent.messagedock.setMinimumSize(100, 50) # connect messagedock to slot self.parent.messagedock.topLevelChanged.connect( self.parent.slots.onLevelChanged) self.parent.messages = QtWidgets.QTextEdit(self.parent) self.parent.messages. \ setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse | QtCore.Qt.TextSelectableByKeyboard) # connect messages to scrollhandler self.parent.messages.textChanged.connect( self.parent.slots.onTextChanged) self.parent.messagedock.setWidget(self.parent.messages) place = QtCore.Qt.BottomDockWidgetArea self.parent.addDockWidget( QtCore.Qt.DockWidgetArea(place), self.parent.messagedock)
Example #2
Source File: code_view.py From angr-management with BSD 2-Clause "Simplified" License | 6 votes |
def _init_widgets(self): window = QMainWindow() window.setWindowFlags(Qt.Widget) # pseudo code text box self._textedit = QCCodeEdit(self) self._textedit.setTextInteractionFlags(Qt.TextSelectableByKeyboard | Qt.TextSelectableByMouse) self._textedit.setLineWrapMode(QCCodeEdit.NoWrap) textedit_dock = QDockWidget('Code', self._textedit) window.setCentralWidget(textedit_dock) textedit_dock.setWidget(self._textedit) # decompilation self._options = QDecompilationOptions(self, self.workspace.instance, options=None) options_dock = QDockWidget('Decompilation Options', self._options) window.addDockWidget(Qt.RightDockWidgetArea, options_dock) options_dock.setWidget(self._options) layout = QHBoxLayout() layout.addWidget(window) layout.setContentsMargins(0, 0, 0, 0) self.setLayout(layout)
Example #3
Source File: tests.py From Qt.py with MIT License | 5 votes |
def test_load_ui_dockwidget(): """Tests to see if the baseinstance loading loads a QDockWidget properly""" import sys from Qt import QtWidgets, QtCompat app = QtWidgets.QApplication(sys.argv) win = QtWidgets.QDockWidget() QtCompat.loadUi(self.ui_qdockwidget, win) assert hasattr(win, 'lineEdit'), \ "loadUi could not load instance to main window" app.exit()
Example #4
Source File: tests.py From Qt.py with MIT License | 5 votes |
def test_load_ui_existingLayoutOnDockWidget(): """Tests to see if loading a ui onto a layout in a DockWidget works""" import sys from Qt import QtWidgets, QtCompat msgs = 'QLayout: Attempting to add QLayout "" to QDockWidget ' \ '"", which already has a layout' with ignoreQtMessageHandler([msgs]): app = QtWidgets.QApplication(sys.argv) win = QtWidgets.QDockWidget() QtWidgets.QComboBox(win) QtWidgets.QHBoxLayout(win) QtCompat.loadUi(self.ui_qdockwidget, win) app.exit()
Example #5
Source File: symexec_view.py From angr-management with BSD 2-Clause "Simplified" License | 5 votes |
def _init_widgets(self): main = QMainWindow() main.setWindowFlags(Qt.Widget) # main.setCorner(Qt.TopLeftCorner, Qt.TopDockWidgetArea) # main.setCorner(Qt.TopRightCorner, Qt.RightDockWidgetArea) pathtree = QPathTree(self.current_simgr, self.current_state, self, self.workspace, parent=main) pathtree_dock = QDockWidget('PathTree', pathtree) main.setCentralWidget(pathtree_dock) # main.addDockWidget(Qt.BottomDockWidgetArea, pathtree_dock) pathtree_dock.setWidget(pathtree) simgrs = QSimulationManagers(self.workspace.instance, self.current_simgr, self.current_state, parent=main) simgrs_dock = QDockWidget('SimulationManagers', simgrs) main.addDockWidget(Qt.RightDockWidgetArea, simgrs_dock) simgrs_dock.setWidget(simgrs) state_viewer = StateInspector(self.workspace, self.current_state, parent=self) state_viewer_dock = QDockWidget('Selected State', state_viewer) main.addDockWidget(Qt.RightDockWidgetArea, state_viewer_dock) state_viewer_dock.setWidget(state_viewer) self._pathtree = pathtree self._simgrs = simgrs self._state_viewer = state_viewer main_layout = QHBoxLayout() main_layout.addWidget(main) main_layout.setContentsMargins(0, 0, 0, 0) self.setLayout(main_layout) # # Private methods #