[Qt-interest] Find Out If QWidget Is Inside a QGraphicsView
Thomas Dähling
t.daehling at googlemail.com
Mon May 18 18:10:34 CEST 2009
I guess this is the easiest way to figure it out:
bool inGraphicsView = false;
QObject* o = this->parent();
while (o && o->parent() && !inGraphicsView)
{
QGraphicsView * g = qobject_cast<QGraphicsView*>(o);
inGraphicsView = g != NULL;
o = o->parent();
}
Regards,
Thomas
Am Montag, den 18.05.2009, 17:52 +0200 schrieb Karol Krizka:
> Hi there,
>
> Is it possible to find out if a QWidget is drawm inside a QGraphicsView
> or if it is being drawn as a native widget?
>
> --
> Cheers,
> Karol Krizka
> http://www.krizka.net
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list