#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# super ( Demo , self ) . __init__ ( ) #NEWLINE# ( x , y , w , h ) = ( 500 , 200 , 300 , 400 ) #NEWLINE# self . setGeometry ( x , y , w , h ) #NEWLINE# vbox = QtGui . QVBoxLayout ( ) #NEWLINE# hbox1 = QtGui . QHBoxLayout ( ) #NEWLINE# vbox . addLayout ( hbox1 ) #NEWLINE# a_btn = QtGui . QPushButton ( 'A' ) #NEWLINE# hbox1 . addWidget ( a_btn ) #NEWLINE# b_btn = QtGui . QPushButton ( 'B' ) #NEWLINE# hbox1 . addWidget ( b_btn ) #NEWLINE# hbox2 = QtGui . QHBoxLayout ( ) #NEWLINE# vbox . addLayout ( hbox2 ) #NEWLINE# hbox2 . addStretch ( ) #NEWLINE# c_btn = QtGui . QPushButton ( 'C' ) #NEWLINE# hbox2 . addWidget ( c_btn ) #NEWLINE# d_btn = QtGui . QPushButton ( 'D' ) #NEWLINE# hbox2 . addWidget ( d_btn ) #NEWLINE# self . setLayout ( vbox )