diff options
author | Timothy Pearson <[email protected]> | 2011-11-29 01:11:08 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-11-29 01:11:08 -0600 |
commit | 8a055d66f43592c257cece2eb8cc021808062917 (patch) | |
tree | d0922f201bd5d24b62a33160d1d9baf9e89f9a70 /examples2/dragdrop.py | |
parent | b388516ca2691303a076a0764fd40bf7116fe43d (diff) | |
download | pytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip |
Initial TQt conversion
Diffstat (limited to 'examples2/dragdrop.py')
-rwxr-xr-x | examples2/dragdrop.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/examples2/dragdrop.py b/examples2/dragdrop.py index 4cc8c73..5ea9171 100755 --- a/examples2/dragdrop.py +++ b/examples2/dragdrop.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Ported to PyQt by Issac Trotts on Jan 1, 2002 +# Ported to PyTQt by Issac Trotts on Jan 1, 2002 import sys from qt import * @@ -9,49 +9,49 @@ import dropsite, secret def addStuff( parent, yn_image, yn_secret = 0 ): - tll = QVBoxLayout( parent, 10 ) + tll = TQVBoxLayout( parent, 10 ) d = dropsite.DropSite( parent, 'dropsite' ) - d.setFrameStyle( QFrame.Sunken + QFrame.WinPanel ) + d.setFrameStyle( TQFrame.Sunken + TQFrame.WinPanel ) tll.addWidget( d ) if yn_image: - stuff = QPixmap() + stuff = TQPixmap() if not stuff.load( "trolltech.bmp" ): - stuff = QPixmap(20,20) - stuff.fill(Qt.green) + stuff = TQPixmap(20,20) + stuff.fill(TQt.green) d.setPixmap( stuff ) else: d.setText("Drag and Drop") - d.setFont(QFont("Helvetica",18)) + d.setFont(TQFont("Helvetica",18)) if secret: s = secret.SecretSource( 42, parent ) tll.addWidget( s ) - format = QLabel( "\n\n\n\nNone\n\n\n\n", parent ) + format = TQLabel( "\n\n\n\nNone\n\n\n\n", parent ) tll.addWidget( format ) tll.activate() parent.resize( parent.sizeHint() ) - QObject.connect( d, PYSIGNAL('message(QString &)'), - format, SLOT('setText(QString &)') ) + TQObject.connect( d, PYSIGNAL('message(TQString &)'), + format, SLOT('setText(TQString &)') ) -app = QApplication( sys.argv ) +app = TQApplication( sys.argv ) -mw = QWidget() +mw = TQWidget() addStuff( mw, 1 ) -mw.setCaption( "Qt Example - Drag and Drop" ) +mw.setCaption( "TQt Example - Drag and Drop" ) mw.show() -mw2 = QWidget() +mw2 = TQWidget() addStuff( mw2, 0 ) -mw2.setCaption( "Qt Example - Drag and Drop" ) +mw2.setCaption( "TQt Example - Drag and Drop" ) mw2.show() -mw3 = QWidget() +mw3 = TQWidget() addStuff( mw3, 1, 1 ) -mw3.setCaption( "Qt Example - Drag and Drop" ) +mw3.setCaption( "TQt Example - Drag and Drop" ) mw3.show() -QObject.connect(qApp,SIGNAL('lastWindowClosed()'),qApp,SLOT('quit()')) +TQObject.connect(qApp,SIGNAL('lastWindowClosed()'),qApp,SLOT('quit()')) app.exec_loop() |