Empty QTableWidget vertical header visibility



  • How to make QTableWidget vertical header is always visible, even if the table is empty? Frequent show / hide this header annoying users


  • Qt Champions 2016

    Hi
    The header is part of the items you add so there is none when its empty
    setHorizontalHeaderItem(0, new QTableWidgetItem("Prueba"));
    horizontalHeaderItem(0)->setText("Whatever");

    So to make it look the same even when no data, you should add the header items.


Log in to reply
 

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