Qt World Summit: Submit your Presentation


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


  • Lifetime Qt Champion

    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