Hello
Quick question: Does anyone know why my window doesn't show frame?
Thank
Mark
import sys
from PySide import QtCore, QtGui
class UI_CMDTester:
def __init__(self):
self.__app = None
self.__win = None
def init(self, \
w_title, \
w_width, \
w_height):
self.__app = QtGui.QApplication(sys.argv)
self.__create_win(w_title, w_width, w_height)
sys.exit(self.__app.exec_())
def __create_win(self, w_title, w_width, w_height):
self.__win = QtGui.QWidget()
self.__win.resize(w_width, w_height)
self.__win.setWindowTitle(w_title)
frame = QtGui.QFrame()
frame.setLineWidth(1)
frame.setFrameRect(QtCore.QRect(200, 200, 300, 300))
layout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight)
layout.addWidget(frame)
self.__win.setLayout(layout)
self.__win.show()
def main():
obj_ct = UI_CMDTester()
obj_ct.init("Window", 800, 600)
if __name__ == "__main__":
main()