Results 1 to 4 of 4

Thread: QtSqlQueryModel removeRow's problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QtSqlQueryModel removeRow's problem

    QSqlQueryModel is a read only model, you can't remove rows from it.

  2. #2
    Join Date
    Feb 2008
    Posts
    2

    Thumbs up Re: QtSqlQueryModel removeRow's problem

    yeah, with QSqlQueryModel read only.
    I want to have something ,

    perhaps I have 7 rows in the table,
    I just want to delete some rows from the QTableView,
    not delete the record in the database,how can I do??

    can u give me a point? thx

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

    Default Re: QtSqlQueryModel removeRow's problem

    Apply a QSortFilterProxyModel or set a condition on the query so that you only retrieve the rows you need from the database.

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 16:57

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.