Skip to content

Commit 30ea6f4

Browse files
committed
WIP: pyside6 designer
1 parent bd4fc86 commit 30ea6f4

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

pydm/main_window.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
from qtpy.QtWidgets import QApplication, QMainWindow, QFileDialog, QAction, QMessageBox
55
from qtpy.QtCore import Qt, QTimer, Slot, QSize, QLibraryInfo, QCoreApplication
66
from qtpy.QtGui import QKeySequence
7-
from .utilities import IconFont, find_file, establish_widget_connections, close_widget_connections
7+
from .utilities import (
8+
IconFont,
9+
find_file,
10+
establish_widget_connections,
11+
close_widget_connections,
12+
ACTIVE_QT_WRAPPER,
13+
QtWrapperTypes,
14+
)
815
from .pydm_ui import Ui_MainWindow
916
from .display import Display, ScreenTarget, load_file, clear_compiled_ui_file_cache
1017
from .connection_inspector import ConnectionInspector
@@ -108,11 +115,13 @@ def __init__(
108115
QLibraryInfo.location(QLibraryInfo.BinariesPath),
109116
QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath),
110117
)
118+
119+
executable_name = "designer" if ACTIVE_QT_WRAPPER == QtWrapperTypes.PYQT5 else "pyside6-designer"
111120
for bin_path in possible_designer_bin_paths:
112121
if platform.system() == "Darwin":
113122
designer_path = os.path.join(bin_path, "Designer.app/Contents/MacOS/Designer")
114123
elif platform.system() == "Linux":
115-
designer_path = os.path.join(bin_path, "designer")
124+
designer_path = os.path.join(bin_path, executable_name)
116125
else:
117126
designer_path = os.path.join(bin_path, "designer.exe")
118127
if os.path.isfile(designer_path):

pydm/widgets/qtplugin_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def __init__(self):
8787
return Plugin
8888

8989

90-
class PyDMDesignerPlugin(QtDesigner.QPyDesignerCustomWidgetPlugin):
90+
class PyDMDesignerPlugin(QtDesigner.QDesignerCustomWidgetInterface):
9191
"""
9292
Parent class to standardize how pydm plugins are accessed in qt designer.
93-
All functions have default returns that can be overriden as necessary.
93+
All functions have default returns that can be overridden as necessary.
9494
"""
9595

9696
def __init__(
@@ -107,7 +107,7 @@ def __init__(
107107
:param cls: Class of the widget to use
108108
:type cls: QWidget
109109
"""
110-
QtDesigner.QPyDesignerCustomWidgetPlugin.__init__(self)
110+
QtDesigner.QDesignerCustomWidgetInterface.__init__(self)
111111
self.initialized = False
112112
self.is_container = is_container
113113
self.cls = cls

0 commit comments

Comments
 (0)