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. QHeaderView: get numeric column index by name

QHeaderView: get numeric column index by name

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.9k 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.
  • F Offline
    F Offline
    fluca1978
    wrote on 14 Oct 2011, 12:10 last edited by
    #1

    Hi,
    is it possible to get the column index number by a column textual name? I don't find any functionality like this.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 14 Oct 2011, 22:20 last edited by
      #2

      You might want to get the underlying model with model() and search that with QAbstractItemModel::match().

      If that does not help, you could iterate through the QAbstractItemModel::headerData() results.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0

      1/2

      14 Oct 2011, 12:10

      • Login

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