Esempio n. 1
0
    def setup_ui(self):
        # Menu
        self.menu = LucidMainWindowMenu(self)
        self.setMenuBar(self.menu)
        self.menu.exit.triggered.connect(self.close)
        self.menu.gather_windows.triggered.connect(self.gather_windows)

        # Restore settings prior to setting up the toolbar/dock
        # TODO: look into why restoring geometry post-dock_manager
        # instantiation causes y-offset/shrinking height
        self._restore_settings()

        # Toolbar
        self.toolbar = LucidToolBar(self)
        self.addToolBar(Qt.TopToolBarArea, self.toolbar)

        # Use the dockmanager for the main window - it will set itself as the
        # central widget
        self.dock_manager = QtAds.CDockManager(self)
        if self.dark:
            self.dock_manager.setStyleSheet(
                open(
                    MODULE_PATH /
                    ('dock_style_dark.css' if self.dark else 'dock_style.css'),
                    'rt').read())
        else:
            self.dock_manager.setStyleSheet(
                open(MODULE_PATH / 'dock_style.css', 'rt').read())
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setupUi(self)
 
        # Create the dock manager. Because the parent parameter is a QMainWindow
        # the dock manager registers itself as the central widget.
        self.dock_manager = QtAds.CDockManager(self)
        
        # Create example content label - this can be any application specific
        # widget
        l = QLabel()
        l.setWordWrap(True)
        l.setAlignment(Qt.AlignTop | Qt.AlignLeft);
        l.setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ")

        # Create a dock widget with the title Label 1 and set the created label
        # as the dock widget content
        dock_widget = QtAds.CDockWidget("Label 1")
        dock_widget.setWidget(l)

        # Add the toggleViewAction of the dock widget to the menu to give
        # the user the possibility to show the dock widget if it has been closed
        self.menuView.addAction(dock_widget.toggleViewAction())

        # Add the dock widget to the top dock widget area
        self.dock_manager.addDockWidget(QtAds.TopDockWidgetArea, dock_widget)
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setup_ui()
        self.dock_manager = QtAds.CDockManager(self)

        self.dock_widgets = []

        for label_text, area in (
            ('1 Top', QtAds.TopDockWidgetArea),
            ('2 Bottom', QtAds.BottomDockWidgetArea),
            ('3 Left', QtAds.LeftDockWidgetArea),
            ('4 Right', QtAds.RightDockWidgetArea),
        ):
            # Create example content label - this can be any application specific
            # widget
            label = QtWidgets.QLabel()
            label.setWordWrap(True)
            label.setAlignment(Qt.AlignTop | Qt.AlignLeft)
            label.setText(
                f"{label_text}: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. "
            )

            # Create a dock widget with the title Label 1 and set the created label
            # as the dock widget content
            dock_widget = QtAds.CDockWidget(label_text)
            dock_widget.setWidget(label)
            self.dock_widgets.append(dock_widget)

            # Add the toggleViewAction of the dock widget to the menu to give
            # the user the possibility to show the dock widget if it has been closed
            self.menu_view.addAction(dock_widget.toggleViewAction())

            # Add the dock widget to the top dock widget area
            self.dock_manager.addDockWidget(area, dock_widget)
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setupUi(self)
 
        QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.OpaqueSplitterResize, True)
        QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.XmlCompressionEnabled, False)
        QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FocusHighlighting, True)
        self.dock_manager = QtAds.CDockManager(self)
        
        # Set central widget
        text_edit = QPlainTextEdit()
        text_edit.setPlaceholderText("This is the central editor. Enter your text here.")
        central_dock_widget = QtAds.CDockWidget("CentralWidget")
        central_dock_widget.setWidget(text_edit)
        central_dock_area = self.dock_manager.setCentralWidget(central_dock_widget)
        central_dock_area.setAllowedAreas(QtAds.DockWidgetArea.OuterDockAreas)
        
        # create other dock widgets
        table = QTableWidget()
        table.setColumnCount(3)
        table.setRowCount(10)
        table_dock_widget = QtAds.CDockWidget("Table 1")
        table_dock_widget.setWidget(table)
        table_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        table_dock_widget.resize(250, 150)
        table_dock_widget.setMinimumSize(200, 150)
        table_area = self.dock_manager.addDockWidget(QtAds.DockWidgetArea.LeftDockWidgetArea, table_dock_widget)
        self.menuView.addAction(table_dock_widget.toggleViewAction())
        
        table = QTableWidget()
        table.setColumnCount(5)
        table.setRowCount(1020)
        table_dock_widget = QtAds.CDockWidget("Table 2")
        table_dock_widget.setWidget(table)
        table_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        table_dock_widget.resize(250, 150)
        table_dock_widget.setMinimumSize(200, 150)
        table_area = self.dock_manager.addDockWidget(QtAds.DockWidgetArea.BottomDockWidgetArea, table_dock_widget, table_area)
        self.menuView.addAction(table_dock_widget.toggleViewAction())

        properties_table = QTableWidget()
        properties_table.setColumnCount(3)
        properties_table.setRowCount(10)
        properties_dock_widget = QtAds.CDockWidget("Properties")
        properties_dock_widget.setWidget(properties_table)
        properties_dock_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        properties_dock_widget.resize(250, 150)
        properties_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidget(QtAds.DockWidgetArea.RightDockWidgetArea, properties_dock_widget, central_dock_area)
        self.menuView.addAction(properties_dock_widget.toggleViewAction())
        
        self.create_perspective_ui()
    def __init__(self, parent=None):
        super().__init__(parent)
        self.save_perspective_action = None
        self.perspective_list_action = None
        self.perspective_combo_box = None
        self.dock_manager = None

        self.setup_ui()

        self.dock_manager = QtAds.CDockManager(self)
        self.perspective_combo_box.activated[str].connect(
            self.dock_manager.openPerspective)
        self.create_content()
        self.resize(800, 600)
        self.restore_state()
        self.restore_perspectives()
Esempio n. 6
0
def main():
    'Application entry point'

    app, window = shared.setup_app(args, unknown, compat)

    # setup the dock manager
    window.setObjectName('MainWindow')
    window.resize(1068, 824)
    widget = QtWidgets.QWidget(window)
    window.setCentralWidget(widget)
    dock_manager = QtAds.CDockManager(window)

    DockArea = QtAds.DockWidgetArea

    # add widgets to the dock manager
    label_widget = QtAds.CDockWidget('Dock')
    label = QtWidgets.QLabel('Some label')
    label_widget.setWidget(label)
    dock_area = dock_manager.setCentralWidget(label_widget)
    dock_area.setAllowedAreas(DockArea.OuterDockAreas)

    list_widget = QtAds.CDockWidget('List')
    lst = QtWidgets.QListWidget()
    for index in range(10):
        lst.addItem(QtWidgets.QListWidgetItem(f'Item {index + 1}'))
    list_widget.setWidget(lst)
    list_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
    dock_manager.addDockWidget(DockArea.LeftDockWidgetArea, list_widget, dock_area)

    table_widget = QtAds.CDockWidget('Table')
    table = QtWidgets.QTableWidget()
    # make sure we have both scroll areas active.
    table.setColumnCount(40)
    table.setRowCount(40)
    table_widget.setWidget(table)
    table_widget.setMinimumSizeHintMode(QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
    dock_manager.addDockWidget(DockArea.RightDockWidgetArea, table_widget, dock_area)

    if not args.use_internal:
        dock_manager.setStyleSheet('')

    # run
    window.setWindowState(compat.WindowMaximized)
    shared.set_stylesheet(args, app, compat)
    return shared.exec_app(args, app, window, compat)
Esempio n. 7
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.save_perspective_action = None
        self.perspective_list_action = None
        self.perspective_combo_box = None
        self.dock_manager = None

        self.setupUi(self)
        self.create_actions()

        # uncomment the following line if the tab close button should be
        # a QToolButton instead of a QPushButton
        # QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.configFlags() | QtAds.CDockManager.TabCloseButtonIsToolButton)

        # uncomment the following line if you want a fixed tab width that does
        # not change if the visibility of the close button changes
        # QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.RetainTabSizeWhenCloseButtonHidden, True)

        # uncomment the follwing line if you want to use non opaque undocking and splitter
        # movements
        # QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.DefaultNonOpaqueConfig)

        # Now create the dock manager and its content
        self.dock_manager = QtAds.CDockManager(self)

        # Uncomment the following line to have the old style where the dock
        # area close button closes the active tab
        # QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.DockAreaHasCloseButton
        # | QtAds.CDockManager.DockAreaCloseButtonClosesTab)
        self.perspective_combo_box.activated[str].connect(
            self.dock_manager.openPerspective)

        self.create_content()
        # Default window geometry - center on screen
        self.resize(1280, 720)
        self.setGeometry(
            QStyle.alignedRect(
                Qt.LeftToRight, Qt.AlignCenter, self.frameSize(),
                QGuiApplication.primaryScreen().availableGeometry()))

        # self.restore_state()
        self.restore_perspectives()
Esempio n. 8
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setupUi(self)

        # Create the dock manager. Because the parent parameter is a QMainWindow
        # the dock manager registers itself as the central widget.
        layout = QVBoxLayout(self.dockContainer)
        layout.setContentsMargins(QMargins(0, 0, 0, 0))
        self.dock_manager = QtAds.CDockManager(self.dockContainer)
        layout.addWidget(self.dock_manager)

        # Create example content label - this can be any application specific
        # widget
        l = QLabel()
        l.setWordWrap(True)
        l.setAlignment(Qt.AlignTop | Qt.AlignLeft)
        l.setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ")

        # Create a dock widget with the title Label 1 and set the created label
        # as the dock widget content
        dock_widget = QtAds.CDockWidget("Label 1")
        dock_widget.setWidget(l)

        # Add the toggleViewAction of the dock widget to the menu to give
        # the user the possibility to show the dock widget if it has been closed
        self.menuView.addAction(dock_widget.toggleViewAction())

        # Add the dock widget to the top dock widget area
        self.dock_manager.addDockWidget(QtAds.TopDockWidgetArea, dock_widget)

        # Create an example editor
        te = QPlainTextEdit()
        te.setPlaceholderText(
            "Please enter your text here into this QPlainTextEdit...")
        dock_widget = QtAds.CDockWidget("Editor 1")
        self.menuView.addAction(dock_widget.toggleViewAction())
        self.dock_manager.addDockWidget(QtAds.BottomDockWidgetArea,
                                        dock_widget)
Esempio n. 9
0
        if self.dock_manager is not None:
            self.dock_manager.deleteLater()

    def setDockManager(self, dock_manager: QtAds.CDockManager):
        self.dock_manager = dock_manager


if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = MainWindow()

    QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FocusHighlighting,
                                     True)
    QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.AllTabsHaveCloseButton,
                                     True)
    dock_manager = QtAds.CDockManager(w)
    w.setDockManager(dock_manager)

    count = 0

    def on_focused_dock_widget_changed(old: QtAds.CDockWidget,
                                       now: QtAds.CDockWidget):
        global count
        qDebug(
            "{:d} CDockManager::focusedDockWidgetChanged old: {} now: {} visible: {}"
            .format(count,
                    old.objectName() if old else "-", now.objectName(),
                    now.isVisible()))
        count += 1
        now.widget().setFocus()
Esempio n. 10
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.save_perspective_action = None
        self.perspective_list_action = None
        self.perspective_combo_box = None
        self.dock_manager = None

        self.setupUi(self)
        self.create_actions()

        # uncomment the following line if the tab close button should be
        # a QToolButton instead of a QPushButton
        # QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.configFlags() | QtAds.CDockManager.TabCloseButtonIsToolButton)

        # uncomment the following line if you want to use opaque undocking and
        # opaque splitter resizing
        #QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.DefaultOpaqueConfig)

        # uncomment the following line if you want a fixed tab width that does
        # not change if the visibility of the close button changes
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.RetainTabSizeWhenCloseButtonHidden, True)

        # uncomment the following line if you don't want close button on DockArea's title bar
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.DockAreaHasCloseButton, False)

        # uncomment the following line if you don't want undock button on DockArea's title bar
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.DockAreaHasUndockButton, False)

        # uncomment the following line if you don't want tabs menu button on DockArea's title bar
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.DockAreaHasTabsMenuButton, False)

        # uncomment the following line if you don't want disabled buttons to appear on DockArea's title bar
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.DockAreaHideDisabledButtons, True)

        # uncomment the following line if you want to show tabs menu button on DockArea's title bar only when there are more than one tab and at least of them has elided title
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.DockAreaDynamicTabsMenuButtonVisibility, True)

        # uncomment the following line if you want floating container to always show application title instead of active dock widget's title
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FloatingContainerHasWidgetTitle, False)

        # uncomment the following line if you want floating container to show active dock widget's icon instead of always showing application icon
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FloatingContainerHasWidgetIcon, True)

        # uncomment the following line if you want a central widget in the main dock container (the dock manager) without a titlebar
        # If you enable this code, you can test it in the demo with the Calendar 0
        # dock widget.
        #QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.HideSingleCentralWidgetTitleBar, True)

        # uncomment the following line to enable focus highlighting of the dock
        # widget that has the focus
        QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FocusHighlighting,
                                         True)

        # uncomment if you would like to enable an equal distribution of the
        # available size of a splitter to all contained dock widgets
        # QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.EqualSplitOnInsertion, True)

        # Now create the dock manager and its content
        self.dock_manager = QtAds.CDockManager(self)

        # Uncomment the following line to have the old style where the dock
        # area close button closes the active tab
        # QtAds.CDockManager.setConfigFlags(QtAds.CDockManager.DockAreaHasCloseButton
        # | QtAds.CDockManager.DockAreaCloseButtonClosesTab)
        self.perspective_combo_box.activated[str].connect(
            self.dock_manager.openPerspective)

        self.create_content()
        # Default window geometry - center on screen
        self.resize(1280, 720)
        self.setGeometry(
            QStyle.alignedRect(
                Qt.LeftToRight, Qt.AlignCenter, self.frameSize(),
                QGuiApplication.primaryScreen().availableGeometry()))

        # self.restore_state()
        self.restore_perspectives()
Esempio n. 11
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setupUi(self)

        QtAds.CDockManager.setConfigFlag(
            QtAds.CDockManager.OpaqueSplitterResize, True)
        QtAds.CDockManager.setConfigFlag(
            QtAds.CDockManager.XmlCompressionEnabled, False)
        QtAds.CDockManager.setConfigFlag(QtAds.CDockManager.FocusHighlighting,
                                         True)
        self.dock_manager = QtAds.CDockManager(self)

        # Set central widget
        label = QLabel()
        label.setText(
            "This is a DockArea which is always visible, even if it does not contain any DockWidgets."
        )
        label.setAlignment(Qt.AlignCenter)
        central_dock_widget = QtAds.CDockWidget("CentralWidget")
        central_dock_widget.setWidget(label)
        central_dock_widget.setFeature(QtAds.CDockWidget.NoTab, True)
        central_dock_area = self.dock_manager.setCentralWidget(
            central_dock_widget)

        # create other dock widgets
        table = QTableWidget()
        table.setColumnCount(3)
        table.setRowCount(10)
        table_dock_widget = QtAds.CDockWidget("Table 1")
        table_dock_widget.setWidget(table)
        table_dock_widget.setMinimumSizeHintMode(
            QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        table_dock_widget.resize(250, 150)
        table_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidgetTabToArea(table_dock_widget,
                                                 central_dock_area)
        table_area = self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.LeftDockWidgetArea, table_dock_widget)
        self.menuView.addAction(table_dock_widget.toggleViewAction())

        table = QTableWidget()
        table.setColumnCount(5)
        table.setRowCount(1020)
        table_dock_widget = QtAds.CDockWidget("Table 2")
        table_dock_widget.setWidget(table)
        table_dock_widget.setMinimumSizeHintMode(
            QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        table_dock_widget.resize(250, 150)
        table_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.BottomDockWidgetArea, table_dock_widget,
            table_area)
        self.menuView.addAction(table_dock_widget.toggleViewAction())

        properties_table = QTableWidget()
        properties_table.setColumnCount(3)
        properties_table.setRowCount(10)
        properties_dock_widget = QtAds.CDockWidget("Properties")
        properties_dock_widget.setWidget(properties_table)
        properties_dock_widget.setMinimumSizeHintMode(
            QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        properties_dock_widget.resize(250, 150)
        properties_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.RightDockWidgetArea, properties_dock_widget,
            central_dock_area)
        self.menuView.addAction(properties_dock_widget.toggleViewAction())

        self.createPerspectiveUi()
Esempio n. 12
0
def main():
    'Application entry point'

    if args.scale != 1:
        os.environ['QT_SCALE_FACTOR'] = str(args.scale)
    else:
        os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = '1'
    if args.style != 'native':
        style = QtWidgets.QStyleFactory.create(args.style)
        QtWidgets.QApplication.setStyle(style)

    app = QtWidgets.QApplication(sys.argv[:1] + unknown)
    window = QtWidgets.QMainWindow()

    # use the default font size
    font = app.font()
    if args.font_size > 0:
        font.setPointSizeF(args.font_size)
    if args.font_family:
        font.setFamily(args.font_family)
    app.setFont(font)

    # setup stylesheet
    if args.stylesheet != 'native':
        file = QtCore.QFile(stylesheet)
        file.open(ReadOnly | Text)
        stream = QtCore.QTextStream(file)
        app.setStyleSheet(stream.readAll())

    # setup the dock manager
    window.setObjectName('MainWindow')
    window.resize(1068, 824)
    widget = QtWidgets.QWidget(window)
    window.setCentralWidget(widget)
    dock_manager = QtAds.CDockManager(window)

    # add widgets to the dock manager
    label_widget = QtAds.CDockWidget('Dock')
    label = QtWidgets.QLabel('Some label')
    label_widget.setWidget(label)
    dock_area = dock_manager.setCentralWidget(label_widget)
    dock_area.setAllowedAreas(QtAds.DockWidgetArea.OuterDockAreas)

    list_widget = QtAds.CDockWidget('List')
    lst = QtWidgets.QListWidget()
    for index in range(10):
        lst.addItem(QtWidgets.QListWidgetItem(f'Item {index + 1}'))
    list_widget.setWidget(lst)
    list_widget.setMinimumSizeHintMode(
        QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
    dock_manager.addDockWidget(QtAds.DockWidgetArea.LeftDockWidgetArea,
                               list_widget, dock_area)

    table_widget = QtAds.CDockWidget('Table')
    table = QtWidgets.QTableWidget()
    # make sure we have both scroll areas active.
    table.setColumnCount(40)
    table.setRowCount(40)
    table_widget.setWidget(table)
    table_widget.setMinimumSizeHintMode(
        QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
    dock_manager.addDockWidget(QtAds.DockWidgetArea.RightDockWidgetArea,
                               table_widget, dock_area)

    if not args.use_internal:
        dock_manager.setStyleSheet('')

    # run
    window.setWindowState(WindowMaximized)
    window.show()
    if args.pyqt6:
        return app.exec()
    else:
        return app.exec_()
Esempio n. 13
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setupUi(self)

        QtAds.CDockManager.setConfigFlag(
            QtAds.CDockManager.OpaqueSplitterResize, True)
        QtAds.CDockManager.setConfigFlag(
            QtAds.CDockManager.XmlCompressionEnabled, False)
        self.dock_manager = QtAds.CDockManager(self)

        # Set central widget
        calendar = QCalendarWidget()
        central_dock_widget = QtAds.CDockWidget("CentralWidget")
        central_dock_widget.setWidget(calendar)
        central_dock_area = self.dock_manager.setCentralWidget(
            central_dock_widget)
        central_dock_area.setAllowedAreas(QtAds.DockWidgetArea.OuterDockAreas)

        # create other dock widgets
        file_tree = QTreeView()
        file_tree.setFrameShape(QFrame.NoFrame)
        file_model = QFileSystemModel(file_tree)
        file_model.setRootPath(QDir.currentPath())
        file_tree.setModel(file_model)
        data_dock_widget = QtAds.CDockWidget("File system")
        data_dock_widget.setWidget(file_tree)
        data_dock_widget.resize(150, 250)
        data_dock_widget.setMinimumSize(100, 250)
        file_area = self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.LeftDockWidgetArea, data_dock_widget,
            central_dock_area)
        self.menuView.addAction(data_dock_widget.toggleViewAction())

        table = QTableWidget()
        table.setColumnCount(3)
        table.setRowCount(10)
        table_dock_widget = QtAds.CDockWidget("Table")
        table_dock_widget.setWidget(table)
        table_dock_widget.setMinimumSizeHintMode(
            QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        table_dock_widget.resize(250, 150)
        table_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.BottomDockWidgetArea, table_dock_widget,
            file_area)
        self.menuView.addAction(table_dock_widget.toggleViewAction())

        properties_table = QTableWidget()
        properties_table.setColumnCount(3)
        properties_table.setRowCount(10)
        properties_dock_widget = QtAds.CDockWidget("Properties")
        properties_dock_widget.setWidget(properties_table)
        properties_dock_widget.setMinimumSizeHintMode(
            QtAds.CDockWidget.MinimumSizeHintFromDockWidget)
        properties_dock_widget.resize(250, 150)
        properties_dock_widget.setMinimumSize(200, 150)
        self.dock_manager.addDockWidget(
            QtAds.DockWidgetArea.RightDockWidgetArea, properties_dock_widget,
            central_dock_area)
        self.menuView.addAction(properties_dock_widget.toggleViewAction())