Customize QSplitter handle color

2019-06-14 09:27发布

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

标签: qt qt4 pyqt4
1条回答
2楼-- · 2019-06-14 09:44

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;
}
查看更多
登录 后发表回答