Results 1 to 3 of 3

Thread: How to keep updating the Qt-Application?

  1. #1
    Join Date
    Jun 2018
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default How to keep updating the Qt-Application?

    Hi!
    I am trying to make a 3D map using Qt-Application. My input keeps on updating with time. I have written a program which will display the map but I am not able to find any suitable function to update the application. I have to close the application every time to view the updated map. Can someone suggest a method to do the same?

    I am using Qt version 4.8.7 on Ubuntu 16.04.

    Thanks in advance!
    Last edited by mayanka_medhe; 22nd June 2018 at 04:18.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to keep updating the Qt-Application?

    Is the map stored in a file? In that case, you can use QFileSystemWatcher and give it the name of the file you want it to watch. When the file changes, the class will emit the QFileSystemWatcher::fileChanged() signal. In your slot that handles that signal, you can reload the map.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to keep updating the Qt-Application?

    Another option would be to use a QTimer to regularly update the map. Disadvantage is that this approach might run updates even when nothing changed on the source data. When it is usable d_stranz' approach will be more efficient because it will only update when the data has changed.

    Ginsengelf

Similar Threads

  1. Updating GUI while processing
    By ecce in forum Newbie
    Replies: 3
    Last Post: 11th May 2015, 11:18
  2. Updating the file from outside the application how to capture the event.
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 3rd January 2012, 14:38
  3. QSortFilterProxyModel not updating
    By karn862 in forum Qt Programming
    Replies: 1
    Last Post: 1st November 2010, 00:16
  4. Crash after updating from Qt4.3 to Qt4.4.0-rc1
    By steg90 in forum Qt Programming
    Replies: 8
    Last Post: 19th May 2008, 18:48
  5. Dynamically updating a qt application
    By dvmorris in forum Qt Programming
    Replies: 2
    Last Post: 9th July 2007, 15:55

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.