QGraphicsLayout Questions

Aaron J. Seigo aseigo at kde.org
Thu Sep 4 20:40:37 CEST 2008


On Thursday 04 September 2008, Gerhard Gappmeier wrote:
> Hi all
>
> I'm asking these question here because on #plasma it was difficult to
> explain the problems.
>
> I'm implementing playground/base/plasma/applets/stockwidget at the moment
> and have some problems.
>
> I've a class SvgLayoutItem which inherits QGraphicsItem and
> QGraphicsLayoutItem. It uses Plasma::Svg to paint theme aware, but it is a
> layoutitem, because I want to layout this items with a QGraphicsGridLayout.

sounds like you should be subclassing QGraphicsWidget instead (which 
subclasses QGraphicsItem and QGraphicsLayoutItem as well); that adds some 
additional API and QGraphicsScene has some special casing for them (the 
isWidget() method tips the hand there)

so try changing to QGraphicsWidget and see if anything gets resolved; if not, 
i'd start by looking at what the size hints are for your widget ....

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080904/a6f778e4/attachment.sig 


More information about the Plasma-devel mailing list