Results 1 to 10 of 10

Thread: Progress of SQL "select"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Progress of SQL "select"

    Quote Originally Posted by brokensword View Post
    Everything I need to know is just how much records were fetched so far.
    I see, I thought you were using QSqlQuery.

    You might try connecting to QAbstractItemModel::rowsInserted() signal.

  2. #2
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Progress of SQL "select"

    Didn't work. rowsInserted() signal is emmited only once - at the end of filling process.

    Quote Originally Posted by jacek View Post
    I see, I thought you were using QSqlQuery.

    You might try connecting to QAbstractItemModel::rowsInserted() signal.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Progress of SQL "select"

    Quote Originally Posted by brokensword View Post
    Didn't work. rowsInserted() signal is emmited only once - at the end of filling process.
    Too bad. I've checked the sources and it looks like QSqlTableModel (QSqlQueryModel actually) doesn't fetch the data row-by-row, but rather retrieves particular cells as needed in data() using QSqlQuery::seek().

    Maybe you could create your own model that will load data using typical while( query.next() ) loop?

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.