Changeset 1386


Ignore:
Timestamp:
Jul 1, 2013 1:08:45 PM (12 years ago)
Author:
jemian
Message:

refs #45: dialog demo improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified moxy/trunk/src/moxy/qtlib/prefs.py

    r1385 r1386  
    7474    app = QtGui.QApplication(sys.argv)
    7575   
     76    panel = QtGui.QWidget()
     77   
     78    layout = QtGui.QVBoxLayout()
     79    panel.setLayout(layout)
     80   
     81    btn = QtGui.QPushButton('click me')
     82    btn.released.connect(handler)
     83    layout.addWidget(btn)
     84   
     85    panel.show()
     86       
     87    sys.exit(app.exec_())
     88
     89
     90def handler():
     91    print 'clicked!'
    7692    panel = PreferencesDialog()
    7793   
     
    7995    result = panel.exec_()
    8096    print result, panel.btn_value
    81     sys.exit(app.exec_())
     97
    8298
    8399# - - - - - - - - - - - - - - - - - - main
Note: See TracChangeset for help on using the changeset viewer.