Skip to content

Instantly share code, notes, and snippets.

@gitcrtn
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gitcrtn/a6f7fa9284e4f80d9f57 to your computer and use it in GitHub Desktop.
Save gitcrtn/a6f7fa9284e4f80d9f57 to your computer and use it in GitHub Desktop.
pyside_layout
import sys
from PySide import QtCore, QtGui
app = QtGui.QApplication(sys.argv)
window = QtGui.QMainWindow()
label = QtGui.QLabel("QComboBox")
combo = QtGui.QComboBox()
layout = QtGui.QHBoxLayout()
layout.addWidget(label)
layout.addWidget(combo)
window.setLayout(layout)
frame = QtGui.QFrame()
frame.setLayout(layout)
window.setCentralWidget(frame)
window.show()
app.exec_()
import sys
from PySide import QtCore, QtGui
app = QtGui.QApplication(sys.argv)
window = QtGui.QMainWindow()
QtGui.QLabel("QComboBox",window)
QtGui.QComboBox(window)
window.show()
app.exec_()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment