Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Change state of verticalheader in QTableWidget



  • Hello,

    What's the best way to change the state of a particular vertical header in QTableWidget ?

    I want to highlight a header according to conditions.

    For a test purpose i just use a button to change the highlight of header of row 2

    I have a 1 column and 10 rows QTableWidget.

    i do

    @ui->msgTable->verticalHeaderItem(2)->setCheckState(Qt::Checked);
    @

    and also a

    @ui->msgTable->verticalHeaderItem(2)->setSelected(true);
    @

    but it doesn't work.
    am i missing something ?

    thanks


Log in to reply