Sijith
Sijith

Reputation: 3932

Customize QSplitter handle color

How to change the color of QSplitter handle

m_pSplitMainWin->setHandleWidth(10);
m_pSplitMainWin->setStyleSheet("QSplitter::handle:background-color: rgb(55, 100, 110);");

This is not working, PLease give your valuable input

Upvotes: 0

Views: 4283

Answers (2)

Kaaf
Kaaf

Reputation: 380

This works:

YourSplitter->setStyleSheet("QSplitter::handle{background: #444444;}");

Upvotes: 1

samdavydov
samdavydov

Reputation: 604

Works for me:

QSplitter::handle
{
    background-color: rgb(255, 255, 255);
}

More complex example:

QSplitter#editorViewSplitter::handle:horizontal
{
    border-left: 1px solid lightGray;
}

QSplitter#editorViewSplitter::handle:vertical 
{
    border-bottom: 1px solid lightGray;
}

Upvotes: 3

Related Questions