in my plugin i copied this from one of the examples on the iclone python site
return Trueand this
dock_window = RLPy.RUi.CreateRDockWidget()
dock_window.SetWindowTitle("SetStage")
dock_window.SetAllowedAreas(RLPy.EDockWidgetAreas_RightDockWidgetArea)
hide_button = QtWidgets.QPushButton(text="Hide", minimumHeight=24)
hide_button.clicked.connect(lambda: dock_window.Hide())
#show_button = QtWidgets.QPushButton(text="Show", minimumHeight=24)
#show_button.clicked.connect(lambda: dock_window.Show())
main_widget = QtWidgets.QWidget()
main_widget.setLayout(QtWidgets.QHBoxLayout())
#main_widget.layout().addWidget(hide_button)
#main_widget.layout().addWidget(show_button)
Stage_One= QtWidgets.QPushButton(text="1", minimumHeight=24)
Stage_One.clicked.connect(lambda: set_Lights(1))
Stage_Two= QtWidgets.QPushButton(text="2", minimumHeight=24)
Stage_Two.clicked.connect(lambda: set_Lights(2))
Stage_Three= QtWidgets.QPushButton(text="3", minimumHeight=24)
Stage_Three.clicked.connect(lambda: set_Lights(3))
Stage_Four= QtWidgets.QPushButton(text="4", minimumHeight=24)
Stage_Four.clicked.connect(lambda: set_Lights(4))
Stage_Five= QtWidgets.QPushButton(text="5", minimumHeight=24)
Stage_Five.clicked.connect(lambda: set_Lights(5))
main_widget.layout().addWidget(Stage_One)
main_widget.layout().addWidget(Stage_Two)
main_widget.layout().addWidget(Stage_Three)
main_widget.layout().addWidget(Stage_Four)
main_widget.layout().addWidget(Stage_Five)
main_widget.layout().addWidget(hide_button)
dock = wrapInstance(int(dock_window.GetWindow()), QtWidgets.QDockWidget)
dock.setFixedWidth(300)
dock.setWidget(main_widget)
dialog_callback = DialogCallback()
dialog_register_id = dock_window.RegisterEventCallback(dialog_callback)
#
dock_window.Show()
when i run the script the dialog moves and behaves fine. it shows the message "The dialog is shown" in the logging console. however if i click the close button on the dialog or try to dock it, it crashes iclone. is this a bug or is there something wrong with the code?
Thank you