From 8a055d66f43592c257cece2eb8cc021808062917 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 29 Nov 2011 01:11:08 -0600 Subject: Initial TQt conversion --- examples2/dragdrop.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'examples2/dragdrop.py') 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() -- cgit v1.2.1