Immediately updating status bar



Hi

I have a window with some buttons and a status bar.
When i click one of the buttons this starts a lengthy operation.
I would like to have a  message like "loading data..." appear
on the status bar as soon as i press the button.

This is what i do:

void IQWin::on_button_load_data_clicked() {
    m_Status.push("loading data...");
    m_IQScene.loadData(m_txtDataFile.get_text().c_str());
}

But that way the message on the status bar only appears when
the function has completed (after all the data has been loaded).

I guess by starting a thread which does the loading i could solve this problem,
but is there a more simple way to do this?

Thank You
  Jody


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]