diff --git a/spinetoolbox/resources_icons_rc.py b/spinetoolbox/resources_icons_rc.py
index 2050a4460..631f1d435 100644
--- a/spinetoolbox/resources_icons_rc.py
+++ b/spinetoolbox/resources_icons_rc.py
@@ -32602,7 +32602,7 @@
\x00\x00\x02R\x00\x00\x00\x00\x00\x01\x00\x06A\x9c\
\x00\x00\x01\x8f\xec\xcf\x12\xea\
\x00\x00\x03\xf6\x00\x00\x00\x00\x00\x01\x00\x06\x978\
-\x00\x00\x01\x93D[e\x88\
+\x00\x00\x01\x93IP\xaeM\
\x00\x00\x01\xea\x00\x00\x00\x00\x00\x01\x00\x062\x92\
\x00\x00\x01\x8f\xec\xcf\x13\x09\
\x00\x00\x04\x94\x00\x00\x00\x00\x00\x01\x00\x06\xaa\xa4\
@@ -32662,7 +32662,7 @@
\x00\x00\x09z\x00\x00\x00\x00\x00\x01\x00\x07P}\
\x00\x00\x01\x8f\xec\xcf\x12\xfa\
\x00\x00\x08\xd8\x00\x00\x00\x00\x00\x01\x00\x07=|\
-\x00\x00\x01\x93D[e\x88\
+\x00\x00\x01\x93IP\xaeN\
\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x01\x00\x07gO\
\x00\x00\x01\x8f\xec\xcf\x12\xfa\
\x00\x00\x076\x00\x00\x00\x00\x00\x01\x00\x07\x0f\x05\
@@ -32736,9 +32736,9 @@
\x00\x00\x07\xca\x00\x00\x00\x00\x00\x01\x00\x07!\x85\
\x00\x00\x01\x8f\xec\xcf\x12\xfa\
\x00\x00\x0b\x16\x00\x00\x00\x00\x00\x01\x00\x07\x9c\x9c\
-\x00\x00\x01\x93D[e\x89\
+\x00\x00\x01\x93IP\xaeP\
\x00\x00\x06\xf8\x00\x00\x00\x00\x00\x01\x00\x06\xfc\x96\
-\x00\x00\x01\x93D[e\x89\
+\x00\x00\x01\x93IP\xaeO\
\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x01\x00\x07\x9b6\
\x00\x00\x01\x8f\xec\xcf\x12\xfa\
\x00\x00\x06\xce\x00\x00\x00\x00\x00\x01\x00\x06\xf6R\
diff --git a/spinetoolbox/ui/mainwindow.py b/spinetoolbox/ui/mainwindow.py
index 203e40fae..6715360d0 100644
--- a/spinetoolbox/ui/mainwindow.py
+++ b/spinetoolbox/ui/mainwindow.py
@@ -241,7 +241,7 @@ def setupUi(self, MainWindow):
sizePolicy.setHeightForWidth(self.dockWidget_eventlog.sizePolicy().hasHeightForWidth())
self.dockWidget_eventlog.setSizePolicy(sizePolicy)
self.dockWidget_eventlog.setMinimumSize(QSize(82, 104))
- self.dockWidget_eventlog.setFeatures(QDockWidget.DockWidgetClosable|QDockWidget.DockWidgetFloatable|QDockWidget.DockWidgetMovable)
+ self.dockWidget_eventlog.setFeatures(QDockWidget.DockWidgetFeature.DockWidgetClosable|QDockWidget.DockWidgetFeature.DockWidgetFloatable|QDockWidget.DockWidgetFeature.DockWidgetMovable)
self.dockWidgetContents = QWidget()
self.dockWidgetContents.setObjectName(u"dockWidgetContents")
sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
@@ -260,7 +260,7 @@ def setupUi(self, MainWindow):
self.textBrowser_eventlog.setObjectName(u"textBrowser_eventlog")
sizePolicy.setHeightForWidth(self.textBrowser_eventlog.sizePolicy().hasHeightForWidth())
self.textBrowser_eventlog.setSizePolicy(sizePolicy)
- self.textBrowser_eventlog.setContextMenuPolicy(Qt.DefaultContextMenu)
+ self.textBrowser_eventlog.setContextMenuPolicy(Qt.ContextMenuPolicy.DefaultContextMenu)
self.textBrowser_eventlog.setOpenLinks(False)
self.verticalLayout_7.addWidget(self.textBrowser_eventlog)
@@ -270,8 +270,8 @@ def setupUi(self, MainWindow):
icon21 = QIcon()
icon21.addFile(u":/icons/check-circle.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.toolButton_executions.setIcon(icon21)
- self.toolButton_executions.setPopupMode(QToolButton.InstantPopup)
- self.toolButton_executions.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
+ self.toolButton_executions.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup)
+ self.toolButton_executions.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
self.verticalLayout_7.addWidget(self.toolButton_executions)
@@ -291,7 +291,7 @@ def setupUi(self, MainWindow):
self.verticalLayout_6.setContentsMargins(0, 0, 0, 0)
self.splitter_console = QSplitter(self.dockWidgetContents_console)
self.splitter_console.setObjectName(u"splitter_console")
- self.splitter_console.setOrientation(Qt.Vertical)
+ self.splitter_console.setOrientation(Qt.Orientation.Vertical)
self.splitter_console.setChildrenCollapsible(False)
self.listView_console_executions = QTreeView(self.splitter_console)
self.listView_console_executions.setObjectName(u"listView_console_executions")
@@ -303,8 +303,8 @@ def setupUi(self, MainWindow):
self.splitter_console.addWidget(self.listView_console_executions)
self.label_no_console = QLabel(self.splitter_console)
self.label_no_console.setObjectName(u"label_no_console")
- self.label_no_console.setContextMenuPolicy(Qt.DefaultContextMenu)
- self.label_no_console.setAlignment(Qt.AlignCenter)
+ self.label_no_console.setContextMenuPolicy(Qt.ContextMenuPolicy.DefaultContextMenu)
+ self.label_no_console.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.label_no_console.setWordWrap(True)
self.splitter_console.addWidget(self.label_no_console)
@@ -314,7 +314,7 @@ def setupUi(self, MainWindow):
MainWindow.addDockWidget(Qt.DockWidgetArea.BottomDockWidgetArea, self.dockWidget_console)
self.dockWidget_design_view = QDockWidget(MainWindow)
self.dockWidget_design_view.setObjectName(u"dockWidget_design_view")
- self.dockWidget_design_view.setFeatures(QDockWidget.DockWidgetMovable)
+ self.dockWidget_design_view.setFeatures(QDockWidget.DockWidgetFeature.DockWidgetMovable)
self.dockWidgetContents_5 = QWidget()
self.dockWidgetContents_5.setObjectName(u"dockWidgetContents_5")
self.verticalLayout_2 = QVBoxLayout(self.dockWidgetContents_5)
@@ -323,13 +323,13 @@ def setupUi(self, MainWindow):
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.graphicsView = DesignQGraphicsView(self.dockWidgetContents_5)
self.graphicsView.setObjectName(u"graphicsView")
- self.graphicsView.setFrameShape(QFrame.NoFrame)
- self.graphicsView.setFrameShadow(QFrame.Raised)
- self.graphicsView.setRenderHints(QPainter.Antialiasing|QPainter.TextAntialiasing)
- self.graphicsView.setDragMode(QGraphicsView.RubberBandDrag)
- self.graphicsView.setResizeAnchor(QGraphicsView.AnchorUnderMouse)
- self.graphicsView.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
- self.graphicsView.setRubberBandSelectionMode(Qt.ContainsItemBoundingRect)
+ self.graphicsView.setFrameShape(QFrame.Shape.NoFrame)
+ self.graphicsView.setFrameShadow(QFrame.Shadow.Raised)
+ self.graphicsView.setRenderHints(QPainter.RenderHint.Antialiasing|QPainter.RenderHint.TextAntialiasing)
+ self.graphicsView.setDragMode(QGraphicsView.DragMode.RubberBandDrag)
+ self.graphicsView.setResizeAnchor(QGraphicsView.ViewportAnchor.AnchorUnderMouse)
+ self.graphicsView.setViewportUpdateMode(QGraphicsView.ViewportUpdateMode.FullViewportUpdate)
+ self.graphicsView.setRubberBandSelectionMode(Qt.ItemSelectionMode.ContainsItemBoundingRect)
self.verticalLayout_2.addWidget(self.graphicsView)
diff --git a/spinetoolbox/ui/mainwindow.ui b/spinetoolbox/ui/mainwindow.ui
index 6ca3e2775..493f660bf 100644
--- a/spinetoolbox/ui/mainwindow.ui
+++ b/spinetoolbox/ui/mainwindow.ui
@@ -151,7 +151,7 @@
- QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable
+ QDockWidget::DockWidgetFeature::DockWidgetClosable|QDockWidget::DockWidgetFeature::DockWidgetFloatable|QDockWidget::DockWidgetFeature::DockWidgetMovable
Event Log
@@ -196,7 +196,7 @@
- Qt::DefaultContextMenu
+ Qt::ContextMenuPolicy::DefaultContextMenu
false
@@ -213,10 +213,10 @@
:/icons/check-circle.svg:/icons/check-circle.svg
- QToolButton::InstantPopup
+ QToolButton::ToolButtonPopupMode::InstantPopup
- Qt::ToolButtonTextBesideIcon
+ Qt::ToolButtonStyle::ToolButtonTextBesideIcon
@@ -255,7 +255,7 @@
-
- Qt::Vertical
+ Qt::Orientation::Vertical
false
@@ -275,13 +275,13 @@
- Qt::DefaultContextMenu
+ Qt::ContextMenuPolicy::DefaultContextMenu
Select an executing item to see its console
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
true
@@ -294,7 +294,7 @@
- QDockWidget::DockWidgetMovable
+ QDockWidget::DockWidgetFeature::DockWidgetMovable
Design View
@@ -322,25 +322,25 @@
-
- QFrame::NoFrame
+ QFrame::Shape::NoFrame
- QFrame::Raised
+ QFrame::Shadow::Raised
- QPainter::Antialiasing|QPainter::TextAntialiasing
+ QPainter::RenderHint::Antialiasing|QPainter::RenderHint::TextAntialiasing
- QGraphicsView::RubberBandDrag
+ QGraphicsView::DragMode::RubberBandDrag
- QGraphicsView::AnchorUnderMouse
+ QGraphicsView::ViewportAnchor::AnchorUnderMouse
- QGraphicsView::FullViewportUpdate
+ QGraphicsView::ViewportUpdateMode::FullViewportUpdate
- Qt::ContainsItemBoundingRect
+ Qt::ItemSelectionMode::ContainsItemBoundingRect
diff --git a/tests/widgets/test_AddProjectItemWidget.py b/tests/widgets/test_AddProjectItemWidget.py
index 782dc14f5..4894d7356 100644
--- a/tests/widgets/test_AddProjectItemWidget.py
+++ b/tests/widgets/test_AddProjectItemWidget.py
@@ -19,6 +19,7 @@
from spinetoolbox.project_item.project_item import ProjectItem
from spinetoolbox.project_item.project_item_factory import ProjectItemFactory
from spinetoolbox.widgets.add_project_item_widget import AddProjectItemWidget
+from spinetoolbox.widgets.properties_widget import PropertiesWidgetBase
from tests.mock_helpers import TestCaseWithQApplication, clean_up_toolbox, create_toolboxui_with_project
@@ -125,7 +126,7 @@ def make_properties_widget(toolbox):
Returns:
QWidget: item's properties tab widget
"""
- return MagicMock()
+ return PropertiesWidgetBase(toolbox)
@staticmethod
def make_specification_menu(parent, index):