source: branches/GUIdev/Original Trial Files (9 December 2013)/ParamGuiEdit3.py @ 1441

Last change on this file since 1441 was 1306, checked in by KelvinHsu, 11 years ago

Initial commit of early python tests

File size: 1.1 KB
Line 
1#-------------------------------------------------------------------------------
2# Name:        ParamGuiEdit3
3# Purpose:
4#
5# Author:      Kelvin
6#
7# Created:     27/11/2013
8# Copyright:   (c) Kelvin 2013
9# Licence:     <your licence>
10#-------------------------------------------------------------------------------
11
12import sys
13from PyQt4 import QtGui
14
15
16class Example(QtGui.QWidget):
17   
18    def __init__(self):
19        super(Example, self).__init__()
20       
21        self.initUI()
22       
23    def initUI(self):
24       
25        QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
26       
27        self.setToolTip('This is a <b>QWidget</b> widget')
28       
29        btn = QtGui.QPushButton('Button', self)
30        btn.setToolTip('This is a <b>QPushButton</b> widget')
31        btn.resize(btn.sizeHint())
32        btn.move(50, 50)       
33       
34        self.setGeometry(300, 300, 250, 150)
35        self.setWindowTitle('Tooltips')   
36        self.show()
37       
38def main():
39   
40    app = QtGui.QApplication(sys.argv)
41    ex = Example()
42    sys.exit(app.exec_())
43
44
45if __name__ == '__main__':
46    main()
Note: See TracBrowser for help on using the repository browser.