[Interest] Pause QTableView while model continues to update
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Thu Jul 9 01:25:01 CEST 2020
On 08/07/2020 20:20, Murphy, Sean wrote:
> The only idea I have at the moment is to have a second model object, that is identical to the first one, except that it isn't connected to the sensor. At the time the user wants to pause the view, I copy the current data out of the main model into the second model, swap out the paused view's model out to the second model, and then swap it back to the main model when the user wants to go back live.
>
> Am I missing something easier? The only other idea I had was that I could try to change the second view from a pure QTableView to one that inherits from QTableView and then have my own slot that disconnects/connects the signals between the model and that view based on the when the user wants to pause/resume.
This sounds much harder, hackish and difficult to test than simply
having a "snapshotting" model like you proposed earlier.
My 2 c,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200709/521a160b/attachment.bin>
More information about the Interest
mailing list