Results 1 to 2 of 2

Thread: Populate TableView/Model using QThread to stop GUI locking up?

  1. #1
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question Populate TableView/Model using QThread to stop GUI locking up?

    Noob question,

    I have searched the forum and found people wanting to do similar things and they seem to find a solution but don't share any code snippets

    Can someone guide me on how this can be achieved?

    Thanks,
    Royce

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Populate TableView/Model using QThread to stop GUI locking up?

    Use signals and slots. Start a thread that will "generate" model items and then emit a signal containing the item. The signal has to be connected to a slot in the model which will then add the item to its internal storage.

    Here is a note about something similar:
    http://blog.wysota.eu.org/index.php/...remote-models/

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.