Question

I have following style segment applied to QHeaderView

QHeaderView::section:selected
    {
        padding-left: 16px;
        background-color: #1c1c1c;
    }

for some reason "selected" Pseudo-State for QHeaderView is not working but in the documentation it says it should work. I have tried following and it works:

QHeaderView::section:first
{
    padding-left: 16px;
    background-color: #1c1c1c;
}

My question is, how can apply a different style for the selected Header TIA

Was it helpful?

Solution

It is a bug on Qt4.7. It affects to QHeaderView::section:checked too. You can see:

If you are using Qt4.7 you can try to upgrade to a newer version. Maybe the bug has been fixed in recent versions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top