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. -
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