Last active
November 9, 2016 08:39
-
-
Save takavfx/f8ce5c68cff819d288e49206447a345b 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
from PySide import QtCore | |
from PySide import QtGui | |
class Example(QtGui.QWidget): | |
def __init__(self, parent=None): | |
super(Example, self).__init__(parent) | |
self.initUI() | |
def initUI(self): | |
self.setGeometry(300, 300, 250, 150) | |
self.setWindowTitle('Panel Title') | |
Lbox = QtGui.QVBoxLayout() | |
self.text = QtGui.QLineEdit('text', self) | |
Lbox.addWidget(self.text) | |
button = QtGui.QPushButton('button', self) | |
Lbox.addWidget(button) | |
self.setLayout(Lbox) | |
# Set Signal | |
button.clicked.connect(self.buttonPush) | |
def buttonPush(self): | |
textVal = self.text.text() | |
print textVal | |
dialog = Example() | |
dialog.setParent(hou.ui.mainQtWindow(), QtCore.Qt.Window) | |
dialog.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment