diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-29 01:11:08 -0600 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-29 01:11:08 -0600 |
| commit | 8a055d66f43592c257cece2eb8cc021808062917 (patch) | |
| tree | d0922f201bd5d24b62a33160d1d9baf9e89f9a70 /examples3/secret.py | |
| parent | b388516ca2691303a076a0764fd40bf7116fe43d (diff) | |
| download | pytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip | |
Initial TQt conversion
Diffstat (limited to 'examples3/secret.py')
| -rw-r--r-- | examples3/secret.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples3/secret.py b/examples3/secret.py index d6d2b6d..434664b 100644 --- a/examples3/secret.py +++ b/examples3/secret.py @@ -12,15 +12,15 @@ def decode(e): payload = str(e.data( "secret/magic" )) if ( str(payload) != '' ): e.accept() - return QString("The secret number is "+str(ord(payload)) ) + return TQString("The secret number is "+str(ord(payload)) ) return None -class SecretDrag(QStoredDrag): +class SecretDrag(TQStoredDrag): def __init__(self, secret, parent=None, name=None): - QStoredDrag.__init__(self, 'secret/magic', parent, name) - data = QByteArray(chr(secret)) + TQStoredDrag.__init__(self, 'secret/magic', parent, name) + data = TQByteArray(chr(secret)) self.setEncodedData( data ) @@ -49,17 +49,17 @@ picture_xpm = [ ] -class SecretSource(QLabel): +class SecretSource(TQLabel): def __init__(self, secret, parent=None, name=None): - QLabel.__init__(self, "Secret", parent, name) - self.setEraseColor( Qt.blue.light() ) - self.setFrameStyle( QLabel.Box | QLabel.Sunken ) + TQLabel.__init__(self, "Secret", parent, name) + self.setEraseColor( TQt.blue.light() ) + self.setFrameStyle( TQLabel.Box | TQLabel.Sunken ) self.setMinimumHeight( self.sizeHint().height()*2 ) - self.setAlignment( QLabel.AlignCenter ) + self.setAlignment( TQLabel.AlignCenter ) self.mySecret = secret def mousePressEvent(self, e): sd = SecretDrag( self.mySecret, self ) - sd.setPixmap(QPixmap(picture_xpm),QPoint(8,8)) + sd.setPixmap(TQPixmap(picture_xpm),TQPoint(8,8)) sd.dragCopy() self.mySecret = self.mySecret + 1 |
