Unsolved Can I create a frame with qt?
-
@vale88 I adjusted:
I wrote:QToolButton *open1ProjectButton = new QToolButton; connect(openProjectButton,&QToolButton::clicked,this,&MainWindow::label); open1ProjectButton->setText(tr("Open")); open1ProjectButton->setToolTip(tr("Open existing project")); open1ProjectButton->setIcon(QIcon(":/icons/live_folder_2.svg")); open1ProjectButton->setEnabled(true); ui->frame_left->addButton("Project", "Project", open1ProjectButton);
but I get:
I must put object on vertical
-
Hi
I dont think sample supports vertical alignment.
The paint code does not seems to support it. -
@mrjj thanks, only a question, if I wanto to change color, there is a gray, I want to put pink, where must I change?
-
@vale88
Hi
Well RibbonGroupGroup first.
Use stylesheet.
I didnt check what rest of the grey is. i assume its the TabWidget.
-
@mrjj Can I see how did you write?
-
@vale88
Hi
I just open the Ui file and right click on top widget and then
change style sheet and then click background color -
ok thanks
-
@vale88
Also the same for
RibbonTabContent
-
@mrjj a question, when I click on a button of horizontal ribbon there is an effect, like I push a true button...how can I recreate this effect?
-
@vale88
You mean on the tabs?
or on the buttons Open , New etc ? -
@mrjj on the button Open, New..ecc..when I push there is an effect
-
What kind of effect? Animation? Fading? Or just the button changes?
-
@Pl45m4 Maybe I solved:
ui->toolButton->setStyleSheet("QToolButton { background-color: beige }"); -
Hi
Its actually just normal QToolButtons with
autoRaise set to true. -
I don't know how change gray color that have black border
-
this color doesn't change..I don't know how I must do to change color of the tab, there are this gray and white in project
-
@vale88
Hi
its the stylesheet in
ribbon.cpp
the
"QTabBar::tab {"
and
"QTabBar::tab::!selected {"
" border-bottom: 1px solid rgb(%4, %5, %6);"
" background-color:#ffffff;"
"}"
and
"QTabBar::tab:selected {" -
@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