[Qt-interest] Label is not getting updated with text at runtime when there is a function call in between
wim.delvaux at adaptiveplanet.com
wim.delvaux at adaptiveplanet.com
Fri Feb 13 15:54:55 CET 2009
On Friday 13 February 2009 14:06:16 Ender EREL wrote:
> Hemalatha Venkataswamy wrote:
> > Hi,
> >
> > I have an application developed in Qt's whose main window is of QWidget.
> > I have a label in my mainwindow which should get updates with text at
> > runtime when I have some functions executed/not executed. Even though my
> > control passes the function 'settext()' for the label and continues with
> > a function call. The label will not be updated on the main window till
> > the function call is ended
> >
> > Can anyone please suggest me answers/solution.
>
> My guess is this: The call to setText() updates the internal text of
> QLabel, but this text is not redrawn on the screen until the function
> returns and event loop issues a paint event.
>
> You may try calling label->repaint() to issue an immediate repaint and
> make the label redraw itself.
or processEvents for qApp
More information about the Qt-interest-old
mailing list