Re: Signaling TreeView to update



On 7/25/07, Joaquim Schmidlap <schmidlap schmidlap org> wrote:

I'm writing an app using TreeModel / TreeView to show something like a
spreadsheet of real-time stock market data. The data is coming in
asynchronously on a background thread (previously created by ACE).

In my market data callback, I write the data into the TreeModel using the []
operator:

   m_row[m_columns.price] = price;

That works fine. The problem is that the TreeView does not seem to render
the new value until I do something to "wake up" the GUI, like mouse over the
window, etc.

As I understand it, I have one of two problems:

1) Writing into the TreeModel does not trigger the TreeView to refresh
automatically, so the view must be forced via a manual "repaint" method of
some kind that I haven't found yet,

I don't believe this is your problem.  the treeview listens for the
'row-changed' signal of your model and will queue a redraw
automatically when the underlying model is changed.  So my guess is
that you're having problems with threading.

The other possibility I can think of is that you're using a custom
treemodel and the row-changed signal isn't being emitted properly...

--
jonner



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