Can I create a frame with qt?
-
Hi
Its actually just normal QToolButtons with
autoRaise set to true. -
@mrjj I wrote:
QString styleSheetText = QString(
"QTabWidget::pane {"
" border-top: 1px solid rgb(255,255,255);"
" position: absolute;"
" top: -1px;"
"}"
""
"QTabBar::tab {"
" padding-top: 5px;"
" padding-bottom: 5px;"
" padding-left: 10px;"
" padding-right: 10px;"
" margin-top: 1px;"
"}"
""
"QTabBar::tab::!selected {"
" border-bottom: 1px solid rgb(0, 0, 0);"
" background-color:#000000;"
"}"
""
"QTabBar::tab:selected {"
" background-color: rgb(255, 255, 255);"
" border-top: 1px solid rgb(%4, %5, %6);"
" border-right: 1px solid rgb(%4, %5, %6);"
" border-left: 1px solid rgb(%4, %5, %6);"
" border-bottom: 1px solid rgb(%1, %2, %3);"
"}"
""
"QTabBar::tab:hover"
"{"
" background-color: rgb(0, 0, 255);"
"}"
""
"QTabBar::tab:selected:hover {"
" background-color: rgb(%1, %10, %3);"
"}"but it doesn't change, it's the same thing
-
Hi
then you are not changing the right ones. -
@mrjj I wrote:
QString styleSheetText = QString( "QTabWidget::pane {" " border-top: 1px solid rgb(255,255,255);" " position: absolute;" " backgound-color: #ff0000" " top: -1px;" "}" "" "QTabBar::tab {" " padding-top: 5px;" " padding-bottom: 5px;" " padding-left: 10px;" " padding-right: 10px;" " margin-top: 1px;" "}" "" "QTabBar::tab::!selected {" " border-bottom: 1px solid rgb(0, 0, 0);" " background-color:#ff0000;" "}" "" "QTabBar::tab:selected {" " background-color: rgb(255, 0, 0);" " border-top: 1px solid rgb(%4, %5, %6);" " border-right: 1px solid rgb(%4, %5, %6);" " border-left: 1px solid rgb(%4, %5, %6);" " border-bottom: 1px solid rgb(%1, %2, %3);" "}" "" "QTabBar::tab:hover" "{" " background-color: rgb(0, 0, 255);" "}" "" "QTabBar::tab:selected:hover {" " background-color: rgb(%1, %10, %3);" "}" ).arg(bg.red()).arg(bg.green()).arg(bg.blue()) .arg(mid.red()).arg(mid.green()).arg(mid.blue());
but it's the same thing
-
Hi
Ok. works for me so
either you are still doing it wrong
or you have other stylesheets that effects it. -
@mrjj I don't know...uff...can you send me ribbon.cpp code?
I don't understand why
if I write in this way and I remove all it's the same thing:// Determine default colors QColor bg = qApp->palette().color(QPalette::Background); QColor mid = qApp->palette().color(QPalette::Mid); // Note: the order in which the background/palette/stylesheet functions are // called does matter. Should be same as in Qt designer. setAutoFillBackground(true); // Set stylesheet QString styleSheetText = QString( ).arg(mid.red()).arg(mid.green()).arg(mid.blue()) .arg(mid.red()).arg(mid.green()).arg(mid.blue()); setStyleSheet(styleSheetText); // Set background color QPalette pal = palette(); pal.setColor(QPalette::Background, Qt::white); setPalette(pal); }