Customize QSplitter handle color

2019-06-14 09:05发布

问题:

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

回答1:

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;
}


标签: qt qt4 pyqt4