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. Inserting QComboBox in the HorizontalHeader of the QTableWidget
QtWS25 Last Chance

Inserting QComboBox in the HorizontalHeader of the QTableWidget

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.5k 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.
  • S Offline
    S Offline
    suma
    wrote on last edited by
    #1

    Hi All,
    Is there any way to insert the QComboBox in the HorizontalHeader in the QTableWidget.
    I can insert in the other cell by using setCellWidget(row,column), since for the header we wont get particular row and column index Im not able to put the combo in the header. Is there any other method to insert combo in header.

    Thanks.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      There is no way to do that in an analogous way as you would using setCellWidget, but QHeaderView being derived from QWidget, it should be possible to give it child widgets. You will have to manage the layout of these widgets manually though.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        suma
        wrote on last edited by
        #3

        Ok Thanks a lot. Ya I ll try it out that.

        1 Reply Last reply
        0

        • Login

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