I have implemented some circle shape QToolButtons using stylesheets; everything is working fine, except that I haven't found a way to add an outside border instead. At the moment QT only supports CSS 2 meaning that I'm not able to use the box-shadow property in CSS 3.
Any ideas in how I can make this happen?
Here is a snippet of the stylesheets applied to a QToolButton
QString StyleManager::labelButtonStyle(QString labelColor){
QString style = QString("QToolButton {"
" border: 1px;"
" width: 26px; min-width: 26px; max-width: 26px;"
" height: 26px; min-height: 26px; max-height: 26px;"
" border-radius: 13px;"
" background-color: %1;"
" color: white;"
" padding: 0;"
" margin: 0;"
" font-size: 12px;"
" font-family: %4;"
"}"
"QToolButton:checked {"
" border: 2px solid %3; "
"}"
"QToolButton:disabled {"
" background-color: %2; "
" color: grey; "
"}").arg(labelColor).arg(BACKGROUND_GREY).arg(darkColor()).arg("Arial");
return style; }
This is the result so far:
Circle shape QToolButton with current border
But I'm trying to get to this.
Example of what I'm trying to accomplished