Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]get the index of a hiddencolumn
Forum Update on Monday, May 27th 2025

[solved]get the index of a hiddencolumn

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 835 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yakine
    wrote on 7 May 2014, 12:31 last edited by
    #1

    hello
    so i used a qtableview to show the data in a table of database when the data show a column be hide but the poblem that i want to get the index of the hidden column if it's possible

    IF YOU HAVE MERCY ON PEOPLE GOD HAVE MERCY ON YOU

    1 Reply Last reply
    0
    • O Offline
      O Offline
      overtime
      wrote on 7 May 2014, 18:45 last edited by
      #2

      what did you do to solve this problem?

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yakine
        wrote on 8 May 2014, 18:45 last edited by
        #3

        hello Overtime
        so firstly the column that i want not to show i hide it by using @setColumnHidden(0,true);@
        the problem was that when the user select a row the index that i get it's the index of the second column and not of the first column that i hidde so to solve the problem i Followed this steps i create a @QModelIndex index
        @ this index will contain the index of the second column @index=ui->tableView->currentIndex();
        int test;
        test=index.row();@ and it's not what i want so i used this code @index = index.sibling(test, 0);@ to post the number of column that i want and here it's 0 also to post the the row value here it's test
        hoppe that's help you

        IF YOU HAVE MERCY ON PEOPLE GOD HAVE MERCY ON YOU

        1 Reply Last reply
        0

        1/3

        7 May 2014, 12:31

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved