Last active
March 3, 2016 08:45
-
-
Save astrofrog/42c43f74b6a09fe54cf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>ScatterWidget</class> | |
<widget class="QWidget" name="ScatterWidget"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>287</width> | |
<height>230</height> | |
</rect> | |
</property> | |
<layout class="QVBoxLayout" name="verticalLayout"> | |
<item> | |
<widget class="QComboBox" name="xAxisComboBox"> | |
</widget> | |
</item> | |
</layout> | |
</widget> | |
<resources/> | |
<connections/> | |
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from PySide import QtGui | |
from PySide.QtUiTools import QUiLoader | |
class Widget(QtGui.QWidget): | |
def __init__(self, parent=None): | |
super(Widget, self).__init__(parent=parent) | |
loader = QUiLoader() | |
self.ui = loader.load('options_widget.ui', self) | |
class MainTest(QtGui.QWidget): | |
def __init__(self, parent=None): | |
super(MainTest, self).__init__(parent=parent) | |
self.layout = QtGui.QVBoxLayout() | |
self.setLayout(self.layout) | |
def add_widget(self): | |
self.layout.addWidget(Widget()) | |
app = QtGui.QApplication([]) | |
main = MainTest() | |
main.show() | |
main.add_widget() | |
app.exec_() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment