Fwd: Re: mobile ui

Dirk Hohndel dirk at hohndel.org
Thu Dec 3 15:25:56 PST 2015


On Thu, Dec 03, 2015 at 11:10:49PM +0000, Sebastian Kügler wrote:
> On Thursday, December 03, 2015 14:50:48 Dirk Hohndel wrote:
> > On Thu, Dec 03, 2015 at 10:26:24PM +0000, Sebastian Kügler wrote:
> > > On Thursday, December 03, 2015 14:04:50 Dirk Hohndel wrote:
> > > > > > I knew my fix was too easy
> > > > >
> > > > > You could try hooking up this guy
> > > > > http://doc.qt.io/qt-5/qquickitem.html#geometryChanged
> > > > >
> > > > >
> > > > >
> > > > > to the second part of setDiveId(), so the geometry of the hidden
> > > > > profilewidget gets updated. Not sure if that helps with the race,
> > > > > though,
> > > > > but it could even be tried to force (in render(), checking if the size
> > > > > is
> > > > > still synced, and potentially calling profileWidget->setGeometry(...)
> > > > > first before painting.
> > > >
> > > > I remember Tomaz telling me to be very very careful what I call from
> > > > within paint. Both for performance issues but also for infinite
> > > > recursions.
> > >
> > > Thinking about it, it would probably be easier to resize the profileWidget
> > > from that virtual.
> >
> > You lost me :-)
> 
> QQuickPaintedItem::geometryChanged(...) is a virtual from QQuickItem, this
> could be implemented in QMLProfile, and it would hold the updateing of the
> size, which now happens in setDiveId.
> 
> It *should* be run before QMLProfile::paint(...) is called, so the underlying
> widget is already updated before it's painted onto our item.
> 
> Better? :-)

MUCH better. I'll look into this. Thanks for the explanation, Sebastian.

/D


More information about the subsurface mailing list