Results 1 to 2 of 2

Thread: How to find out row index of a QTableWidget.

  1. #1
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to find out row index of a QTableWidget.

    Hi

    I have a table which has four column. Each column contain combobox. I want to find row no of table when clicked on combobox. Table is created at run time.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to find out row index of a QTableWidget.

    When adding combobox to the table, set a property on it describing row and column, this way you'll be able to easily retreive it whenever you want.

    it won't work if you rable is dynamic though.

    I think it would be easier to do if you'd use table view and item delegate.

Similar Threads

  1. Replies: 2
    Last Post: 21st March 2011, 22:00
  2. Replies: 1
    Last Post: 14th September 2010, 16:26
  3. Replies: 0
    Last Post: 20th July 2010, 16:07
  4. Get Row Index
    By wirasto in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2009, 13:57
  5. How to find best size for QTableWidget?
    By plamkata in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2008, 19:07

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.