Customize QSplitter handle color

久未见 提交于 2019-12-08 10:42:09

问题


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


来源:https://stackoverflow.com/questions/44924036/customize-qsplitter-handle-color

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!