[Qt-interest] Label is not getting updated with text at runtime when there is a function call in between
Ender EREL
erelender at yahoo.com
Fri Feb 13 14:06:16 CET 2009
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.
--
Ender EREL
More information about the Qt-interest-old
mailing list