Results 1 to 4 of 4

Thread: How to auto update values on QTableView?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2013
    Posts
    22
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to auto update values on QTableView?

    MySQL 5.5.24 (WAMP 2.2) is being used. Could you please provide some details on how this can be done?

    Thanks in advance.
    Last edited by vrltwe; 30th December 2013 at 17:11. Reason: updated contents

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to auto update values on QTableView?

    AFAICT there is no inbuilt Mysql mechanism to alert an external observer that a table has changed. You can use a trigger to detect updates but to notify an external watcher you would need to use a user-defined function (UDF) to call an external application that broadcasts the notification. Here is an example
    https://help.pubnub.com/entries/2244...abase-Trigger-
    (This will not scale well for high speed inserts)

    You can also use a trigger to update a single row table containing a timestamp that your program can poll. When the timestamp becomes newer than your local last update time then refresh your view. Google has plenty of different variations on this theme.

  3. The following user says thank you to ChrisW67 for this useful post:

    vrltwe (31st December 2013)

Similar Threads

  1. columns in QTableView don't auto stretch
    By aresa in forum Qt Programming
    Replies: 1
    Last Post: 22nd January 2014, 03:59
  2. Replies: 1
    Last Post: 22nd April 2013, 23:42
  3. QTableView and auto scroll
    By ranna in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2009, 13:02
  4. Replies: 8
    Last Post: 25th February 2008, 17:00
  5. Auto update module
    By munna in forum General Discussion
    Replies: 3
    Last Post: 26th September 2006, 14:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.