[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Question about Qt syntax between C++ and python
From:       Jim Bublitz <jbublitz () nwinternet ! com>
Date:       2006-06-29 18:56:53
Message-ID: 200606291156.54013.jbublitz () nwinternet ! com
[Download RAW message or body]

On Thursday 29 June 2006 11:09, Michael Sullivan wrote:
> On Thu, 2006-06-29 at 18:44 +0100, Phil Thompson wrote:
> > On Thursday 29 June 2006 6:30 pm, Michael Sullivan wrote:
> > > If I've got a symbolic constant, such as "Qt::AlignHCenter", how would
> > > I write that in python?
> >
> > Qt.AlignHCenter
> >
> > Phil
>
> Here is my program:
>
> #!/usr/bin/env python
>
> import sys
> import qt

>       self.blank[0].setAlignment(Qt.AlignHCenter);
> #      self.blank[0].setFont(QFont("OldEnglish", 16,Qt::Bold, true));

      self.blank[0].setAlignment(qt.Qt.AlignHCenter);
      self.blank[0].setFont(qt.QFont("OldEnglish", 16,qt.Qt::Bold, true));

or:

from qt import Qt, QFont, QWidget ...

      ...

     self.blank[0].setAlignment(Qt.AlignHCenter);
     self.blank[0].setFont(QFont("OldEnglish", 16,Qt::Bold, true));

Jim

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic