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

QTableWidget headerview stylesheet



  • Hello!!

    I have a little doubt about the QTableWidget stylesheet. I want to set a qlinergradient background color for the header but not for each section, I want it for all header.

    I have this:

    80af9094-fe2d-4379-a2b2-1720b5f041cf-image.png

    with this code:

    QTableView QHeaderView::section {
        background: qlineargradient(...);
    }
    

    and I need this:

    6ed13bb7-6daf-469b-8b55-e560352fe78d-image.png

    How can I do it? Thank you very much!


  • Lifetime Qt Champion

    Hi,

    You should add the Qt version you are using, the OS you are running your application on as well as a minimal compilable example that shows this behaviour.


Log in to reply