[PyKDE] Fwd: Re: Newbie: QTable Questions - Part II

Boudewijn Rempt boud at valdyas.org
Wed May 1 08:46:01 BST 2002


While mailing Jeff directly, I got the following:

----- Transcript of session follows -----
... while talking to mx03.mail.bellsouth.net.:
>>> DATA
<<< 550 .net 003: you are not allowed to send e-mail to 
<laytonjb at bellsouth.net>
550 5.1.1 <laytonjb at bellsouth.net>... User unknown
<<< 503 No recipients specified

So:

----------  Forwarded Message  ----------

Subject: Re: Newbie: QTable Questions - Part II
Date: Wed, 1 May 2002 08:42:01 +0200
From: Boudewijn Rempt <boud at valdyas.org>
To: Jeff Layton <laytonjb at bellsouth.net>

On Wednesday 01 May 2002 03:21, you wrote:
> > > (1) column headers (via QHeader I think)
> >
> > QHeader.addLabel.
>
> Is this a method of QTable? I'm a little lost on how to use QHeader
> with QTable (I'm looking at the QT documentation as I type). I'm
> attaching a simple table that might help.

No -- you retrieve the header with QTable.get[Horizontal|Vertical]Header.
However, there's a bug in all the the most recent release candidate
of PyQt that means that you get a QObject instead of a QHeader if you use the
function.
eat!

> > > (3) Make the cells read-only
> >
> > QTableItem.EditType or QTableItem.setEnabled
>
> Not sure about this one either. Is QTableItem a subclass? When
> I'm __init__ QTable, do I do also __init__ QTableItem using "self"
> as the QTable instance?

Each cell is an item: you get the items with QTable.item(row, col).

> Thanks! I really appreciate all of your help (and your book!)

You're fortunate that I found some time yesterday to get working
with QTable myself, otherwise I would have had to stay with the
generalities in the documentation myself :-).



--
Boudewijn Rempt | http://www.valdyas.org

-------------------------------------------------------

-- 
Boudewijn Rempt | http://www.valdyas.org




More information about the PyQt mailing list