[PyKDE] Question about Qt syntax between C++ and python
Andreas Pakulat
apaku at gmx.de
Thu Jun 29 19:41:31 BST 2006
On 29.06.06 13:09:05, 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
> >
> Here is my program:
>
> #!/usr/bin/env python
>
> import sys
> import qt
>
> I tried the solution suggested, writing "Qt::AlignHCenter" as
> "Qt.AlignHCenter" and saved an ran the script. Here's the output:
But you didn't import the Qt class from the qt package, in that case you
need to use
qt.Qt.AlignHCenter
Andreas
--
Someone is speaking well of you.
More information about the PyQt
mailing list