[Qt-interest] QWinWidget's pos() always returns (0, 0)
Long Cheng
kevinclcn at gmail.com
Thu May 27 03:42:51 CEST 2010
Hi William, I don't quite understand you. When you said "a call to
qApp->processEvents(...), placed here", where do you mean?
BTW, I found QWinWidget doesn't have parent QWidget, and the
QWinWidget->pos() is the position in its parent widget, that may be the
reason it is always zero.
On Wed, May 26, 2010 at 10:03 PM, william.crocker at analog.com <
william.crocker at analog.com> wrote:
>
>
> Long Cheng wrote:
> > I tried to change QWinWidget's position by calling pWinWidget->move(50,
> > 50), but after that the position returned by pWinWidget->pos() was still
> > (0, 0);
> >
> > QWinWidget* pWinWidget = new QWinWidget(pCView);
> > pWinWidget->move(50, 50);
>
>
> I find that a call to qApp->processEvents(...),
> placed here, usualy takes care of this.
>
>
> > QPoint pos = pWinWidget->pos(); //****NOTE: the pos equals to (0, 0)*****
> >
> > The code is based on Qt 4.5.2
> >
> > Thanks,
> > Long
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100527/bd9b4ffa/attachment.html
More information about the Qt-interest-old
mailing list