Results 1 to 6 of 6

Thread: Updating a data in QTableView question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: Updating a data in QTableView question

    And how to delete item from model (from tableview) if necessary. I do not know how to get index (row) of selected item.
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Updating a data in QTableView question

    Quote Originally Posted by MarkoSan View Post
    And how to delete item from model (from tableview) if necessary.
    Use QAbstractItemModel::removeRows(), or if you're using QStandardItems I believe you can simply delete them.

    I do not know how to get index (row) of selected item.
    J-P Nurmi

Similar Threads

  1. QTableView and its Scrollbar question
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 28th May 2008, 15:23
  2. QTableview data display font question
    By MarkoSan in forum Newbie
    Replies: 8
    Last Post: 14th May 2008, 13:57
  3. QTableView - data() - item
    By starcontrol in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2008, 15:41
  4. finding data in a qtableview
    By JeanC in forum Newbie
    Replies: 4
    Last Post: 7th March 2008, 20:36
  5. QTableView Question
    By kandalf in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2007, 19:02

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.