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

List:       pykde
Subject:    Re: [PyQt] Always show a QLineEdit as QItemDelegate
From:       Linos <info () linos ! es>
Date:       2012-04-27 7:22:14
Message-ID: 4F9A4926.8000306 () linos ! es
[Download RAW message or body]

El 27/04/12 00:12, Jake Richards escribi=F3:
> Hello:
>   I've got a QTreeView that uses a QLineEdit as a QItemDelegate for one o=
f it's
> columns.  The problem is that I want to display the QLineEdit all the tim=
e, not
> just when the user double clicks and starts editing.  Am I using the wrong
> approach to accomplish this?  I was using a QTreeWidget with setItemWidge=
t but
> the docs said that I should only do that if I'm using static data, so I'm
> attempting to use the delegates.  Thank you for any help!
> =


Hello,
	if you want to do this from a delegate, and you should if your view has ma=
ny
items because a complete widget it is much heavier, you should paint the wi=
dget,
much like Qt do, in the paint method of the delegate, using
QApplication.style().drawControl(), in this thread you have an example
http://www.qtcentre.org/threads/18959-QWidget-in-tableview

Regards,
Miguel Angel.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

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