Results 1 to 7 of 7

Thread: Fetching data from table view

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    151
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    6
    Thanked 13 Times in 11 Posts

    Default Re: Fetching data from table view

    How does
    Qt Code:
    1. lsn.deleteLesson(ui->tableView_lessons->currentIndex())
    To copy to clipboard, switch view to plain text mode 
    In your button clicked calling function relate to
    Qt Code:
    1. void lessons::deleteLesson(QModelIndex index)
    2. {
    3. QSqlTableModel *model = this->lessonsTable()
    4. .....
    5. }
    To copy to clipboard, switch view to plain text mode 

    You are passing a tableview index in the calling function to who knows what in the deleteLesson slot.

    Also have you connected the signal and slot properly?

  2. #2
    Join Date
    Jul 2009
    Posts
    139
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    13
    Thanked 59 Times in 52 Posts

    Default Re: Fetching data from table view


  3. The following user says thank you to numbat for this useful post:

    utkuaydin (19th January 2010)

Similar Threads

  1. Set height for table view
    By sasi in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2009, 08:07
  2. Table view
    By tulsi in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2009, 08:07
  3. Table view->model->set data
    By tulsi in forum Qt Programming
    Replies: 3
    Last Post: 21st April 2009, 08:36
  4. Table Widget Vs. Table View
    By winston2020 in forum Qt Programming
    Replies: 2
    Last Post: 19th October 2008, 09:56
  5. Table Model / View Problem -- Data Not Displaying
    By jhendersen in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2007, 06:45

Tags for this Thread

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.