Results 1 to 7 of 7

Thread: Disable row/rows in QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    14

    Default Re: Disable row/rows in QTableView

    Ahhhh...Now, I see...Looks like I was about 95% there -- the "if(index.row()== ( rowCount() -1 ) ) " part is where I was tripping up...I haven't really used ItemFlags yet (only been using Qt for about 3 months part time)...Some things are so obvious in hindsight...

    Throughout the rest of my app I've handled the enable/disabling of the data easily because I was using a master/detail design...Once data was submitted to the DB, then just disabled the entire tableview; a "new" button click resulted in me turning it back on, but this last section is just once large tableview...

    I appreciate the push!


    scott

  2. #2
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    14

    Default Re: Disable row/rows in QTableView

    Works perfectly!!! Put in the line,
    Qt Code:
    1. if(index.row()== ( rowCount() -1 ) )
    To copy to clipboard, switch view to plain text mode 
    and everything worked great -- thanks for that direction!


    scott

Similar Threads

  1. Color the rows in QTableView
    By grub87 in forum Qt Programming
    Replies: 11
    Last Post: 17th June 2009, 20:41
  2. QTableView 2 rows inside every row
    By skuda in forum Qt Programming
    Replies: 3
    Last Post: 22nd April 2009, 09:23
  3. QTableWidget: Disable 'snapping' to rows and columns?
    By PolyVox in forum Qt Programming
    Replies: 2
    Last Post: 8th October 2008, 20:04
  4. [QTable] Disable centering of rows on mouseclick
    By BrainB0ne in forum Qt Programming
    Replies: 4
    Last Post: 30th October 2006, 12:47
  5. Copying QTableView rows
    By derrickbj in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2006, 00:00

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.