[Qt-interest] Confused about dataChanged Signal

Bill Moo cppsysdev at gmail.com
Fri Jul 2 12:26:22 CEST 2010


Hello again.

According the the v4.6.3 docs this signal is emitted when an existing item
changes, in addition to that the implication is that there is no requirement
for a setData(...) function on a read only model so with that in mind I'm of
the opinion that all is taken care of internally for this RO model.

However, I am seriously confused in that I never see any updates appearing
in the table view with one exception, and that only appears when I click the
view!

As I understand it (which must be incorrectly) I was assuming that the grid
would automagically get updated when my thread modified the member variables
having connected my Model's dataChanged(...) signal to my QTableView's
dataChanged Slot.

Before I launch the thread I have set the FileName (column 0) to say
"Processing File. Please wait..." however this change never appears in the
grid unless I click the view (which forces an update).

Due to the sheer size of the files being processed the the line number value
changes a lot, and I can see this in the qDebug() output, but the UI never
reflects this?

Of course I have to ask, because I am changing the values of these variables
does this then mean that my Model is in fact not RO but RW?

-- 
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100702/84c28ca7/attachment.html 


More information about the Qt-interest-old mailing list