<s> """<STR_LIT>""" <EOL> import sys <EOL> try : <EOL> from PySide import QtCore <EOL> from PySide import QtGui <EOL> except ImportError : <EOL> from PyQt4 import QtCore <EOL> from PyQt4 import QtGui <EOL> class SheetWin ( QtGui . QWidget ) : <EOL> def __init__ ( self , parent = None ) : <EOL> super ( SheetWin , self ) . __init__ ( parent ) <EOL> self . setWindowFlags ( QtCore . Qt . Sheet ) <EOL> btn = QtGui . QPushButton ( "<STR_LIT>" , self ) <EOL> btn . move ( <NUM_LIT:10> , <NUM_LIT:10> ) <EOL> btn . clicked . connect ( self . close ) <EOL> self . _settings = { "<STR_LIT:name>" : "<STR_LIT:a>" , "<STR_LIT>" : "<STR_LIT:b>" } <EOL> def closeEvent ( self , evt ) : <EOL> print "<STR_LIT>" <EOL> self . emit ( QtCore . SIGNAL ( "<STR_LIT>" ) , self ) <EOL> return super ( SheetWin , self ) . closeEvent ( evt ) <EOL> class Demo ( QtGui . QWidget ) : <EOL> def __init__ ( self ) : <EOL> super ( Demo , self ) . __init__ ( ) <EOL> x , y , w , h = <NUM_LIT> , <NUM_LIT:200> , <NUM_LIT> , <NUM_LIT> <EOL> self . setGeometry ( x , y , w , h ) <EOL> btn = QtGui . QPushButton ( "<STR_LIT>" , self ) <EOL> btn . clicked . connect ( self . btn_cb ) <EOL> def btn_cb ( self ) : <EOL> sw_obj = SheetWin ( self ) <EOL> sw_obj . show ( ) <EOL> self . connect ( sw_obj , QtCore . SIGNAL ( "<STR_LIT>" ) , self . _sw_cb ) <EOL> def _sw_cb ( self , sw_obj ) : <EOL> print "<STR_LIT>" , sw_obj <EOL> def show_and_raise ( self ) : <EOL> self . show ( ) <EOL> self . raise_ ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> app = QtGui . QApplication ( sys . argv ) <EOL> demo = Demo ( ) <EOL> demo . show_and_raise ( ) <EOL> sys . exit ( app . exec_ ( ) ) </s>
