Results 1 to 3 of 3

Thread: Aborting a query set on a TableModel

  1. #1
    Join Date
    Mar 2006
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Aborting a query set on a TableModel

    Greetings,

    I would like to allow the user to abort a query that is set on a TableModel for a table with millions of records. I am only currently warning them about how many records the query will pull up but I am unable to allow them to abort if the user accidentally starts the query.

    Any solutions or suggestions would be appreciated.

    ~Cheers

  2. #2
    Join Date
    May 2006
    Posts
    28
    Thanks
    8
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Aborting a query set on a TableModel

    I am a Qt beginer Quid,
    The only thing I can think of is using a QThread, so that the application can kill the thread at some time.
    Perhaps this wont work when the thread is doing a sql query - I really dont know if it would work or not.

  3. #3
    Join Date
    Mar 2006
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Aborting a query set on a TableModel

    I think the thread would allow the user to go ahead and use the app but the query would still be executing on the database in the background filling up memory with data.

    I need to figure how to fetch 100 rows and then check an abort flag and do this continually until I have all the data the user requested.

    I know someone has a solution out there. I really do not want to start tinkering with the Qt source.

Similar Threads

  1. combining query lists
    By jayw710 in forum Qt Programming
    Replies: 4
    Last Post: 10th February 2006, 21:17
  2. Record update windowd entered data saving
    By MarkoSan in forum Qt Programming
    Replies: 56
    Last Post: 18th January 2006, 18:50

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.