Shows how to add a fancy python widget to the right side bar.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20from ost import gui
21
22from PyQt5 import QtCore, QtGui, QtWidgets
23
24
25panels=gui.GostyApp.Instance().perspective.panels
26
27
28my_awesome_widget = QtWidgets.QWidget()
29layout = QtWidgets.QVBoxLayout()
30layout.addWidget(QtWidgets.QPushButton('I dont do anything'))
31layout.addWidget(QtWidgets.QPushButton('I do even less'))
32my_awesome_widget.setLayout(layout)
33
34
35wid=gui.Widget(my_awesome_widget)
36
37
38panels.AddWidgetToPool("Widget that doesnt do a thing", wid)
39
40
41panels.AddWidget(gui.PanelPosition.RIGHT_PANEL,wid,False)
42