[Panel-devel] Plasma::Widget subclassing and QGVItem's
Andreas Aardal Hanssen
ahanssen at trolltech.com
Thu May 24 08:31:00 CEST 2007
On Wednesday 23 May 2007 18:25, Aaron J. Seigo wrote:
> > > On Tuesday 22 May 2007, Matias Valdenegro T. wrote:
> > > well, we could wrap Qt's ones. what this would mean probably is:
> > > making Widget not subclass QGraphicsItem or that matter
> > > DataVisualization. it would then become, essentially, an interface
> > > class for "extra" plasma features. so:
> > > namespace Plasma
> > > {
> > > class Label : public QGraphicsItem, public Widget
> > > {
> > > // implementation of Widget API
> > > };
> > > }
> > > how does that sound?
> > Sounds nice, but widget should at least inherit LayoutItem to be
> > layout-manageable.
> well, yes. i thought was implied =)
So, maybe Widget is a Layoutitem? Maybe inheriting from QGraphicsItem and
LayoutItem will make the item a widget?
class Widget : public QGraphicsItem, public LayoutItem
{
};
Just a thought. The approach we're looking at in Qt is that layouts are items
as well, so the layout hierarchy is the same as the item hierarchy (as
opposed to with QWidget, where the hierarchy is separate).
--
Andreas Aardal Hanssen / bibr - andreas . hanssen @ trolltech.com
More information about the Panel-devel
mailing list