How can I add custom widget to tableWidget header.



  • Hello,
    I want to add custom widget (subclass of QWidget) to header of QTableWidget. I searched lots of quetions about that but I couldn't find a clear answer. I am using pyqt.

    Basically my custom widget includes 6 checkbox and a label.

    Is it doable? I am new to qt and python. So please explain clearly if you have an answer.

    Thanks :)



  • Hi,

    Welcome to devnet, to add a custom widget to tableView/Widget header please have a look at this link Widgets on a header

    Regards,
    Sam



  • Thanks. Are there any tutorial for python? I cant understand c++.



  • You can either subclass QHeaderView or just create a QVBoxLayout and but your widget first then the table widget.

    Without a better indication of how you want it to look like it's difficult to be more specific


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.