This is the Qt4 spin box example included in AVC distribution.
It comes into two versions. The first has the GUI generated from
a Qt Designer UI description. The second has the GUI generated directly
by program instructions.
For full details see the "Qt4 examples" chapter of the
user manual.

01:#!/usr/bin/python02:# .+03:#04:# .identifier : $Id:$05:# .context : Application View Controller06:# .title : A spin box replicated into a text label (Qt4)07:# .kind : python source08:# .author : Fabrizio Pollastri09:# .site : Revello - Italy10:# .creation : 7-Dec-200611:# .copyright : (c) 2006 Fabrizio Pollastri.12:# .license : GNU General Public License (see below)13:#14:# This file is part of "AVC, Application View Controller".15:#16:# AVC is free software; you can redistribute it and/or modify17:# it under the terms of the GNU General Public License as published by18:# the Free Software Foundation; either version 3 of the License, or19:# (at your option) any later version.20:#21:# AVC is distributed in the hope that it will be useful,22:# but WITHOUT ANY WARRANTY; without even the implied warranty of23:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the24:# GNU General Public License for more details.25:#26:# You should have received a copy of the GNU General Public License27:# along with this program. If not, see <http://www.gnu.org/licenses/>.28:#29:# .-30:31:32:from PyQt4.QtCore import*# Qt core33:from PyQt4.QtGui import*# Qt GUI interface34:from PyQt4.uic import*# ui files realizer35:import sys # system support36:37:from avc import*# AVC38:39: UI_FILE ='qt4_spinbox.ui'# qt ui descriptor40:41:42:classExample(QApplication,AVC):43: """44: A spin box whose value is replicated into a text label45: """46:47:def__init__(self):48:49:# create GUI50: QApplication.__init__(self,sys.argv)51: self.root =loadUi(UI_FILE)52: self.root.show()53:54:# the variable holding the spin box value55: self.spin_value =056:57:58:#### MAIN59:60: example =Example()# instantiate the application61: example.avc_init()# connect widgets with variables62: example.exec_()# run Qt event loop until quit63:64:#### END65: