Results 1 to 3 of 3

Thread: On successful entry a new record, a new empty row will should be added to QTableView

  1. #1
    Join Date
    Oct 2010
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default On successful entry a new record, a new empty row will should be added to QTableView

    hi

    I want to create a blank row in QTableView.On successful entry a new record, a new empty row will should be added to QTableView. Could you please help me out.

    Thank in advance
    Nagesh

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: On successful entry a new record, a new empty row will should be added to QTableV

    I want to create a blank row in QTableView.
    QAbstractItemModel::insertRow (int row, const QModelIndex & parent = QModelIndex())
    On successful entry a new record, a new empty row will should be added to QTableView.
    The call above will either insert a 'blank' row and return true, or fail and return false. Presumably you want the user to input some data before you declare a row is a 'successful entry'. You can detect when the user moves off your new row by overriding the currentChanged() protected method of the view.

  3. #3
    Join Date
    Oct 2010
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: On successful entry a new record, a new empty row will should be added to QTableV

    Thank you for the reply. Could you please provide me an example.

    what kind of listener i need to write to add a new row when user add data to last row
    Regards
    Nagesh

Similar Threads

  1. Replies: 3
    Last Post: 26th March 2010, 04:32
  2. Replies: 0
    Last Post: 11th March 2010, 07:41
  3. QComboBox (model based) - provide an empty entry
    By antarctic in forum Qt Programming
    Replies: 0
    Last Post: 21st October 2009, 18:45
  4. QTableView, add new record?
    By grellsworth in forum Qt Programming
    Replies: 6
    Last Post: 5th July 2007, 15:08
  5. Replies: 2
    Last Post: 17th July 2006, 14:52

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.