Skip to content

Instantly share code, notes, and snippets.

@takavfx
Last active November 9, 2016 08:39
Show Gist options
  • Save takavfx/f8ce5c68cff819d288e49206447a345b to your computer and use it in GitHub Desktop.
Save takavfx/f8ce5c68cff819d288e49206447a345b to your computer and use it in GitHub Desktop.
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