Unsolved Can I create a frame with qt?
-
Hi
QTitanRibbon is cool but also a bit expensive.
samples here. (scroll down a bit)
https://www.devmachines.com/documentation/QtitanComponents/html/examples.html#ribbon_examplesFor home made simple version, see
https://github.com/martijnkoopman/Qt-Ribbon-Widget -
@mrjj I like the last example, THANKS
-
@mrjj a question...I want a frame on the left..but I don't understand how I must add it:
I did:
and then:
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); // Hide ribbon dock title bar ui->ribbonDockWidget->setTitleBarWidget(new QWidget()); ui->dockWidget->setTitleBarWidget(new QWidget()); ui->frame_left->addTab(QIcon(":/icons/briefcase_1.svg"), "Project"); ui->frame_left->addTab(QIcon(":/icons/monitor_1.svg"), "View"); ui->frame_left->addTab(QIcon(":/icons/engineering_1.svg"), "Tools"); ui->frame_left->addTab(QIcon(":/icons/information_1.svg"), "Help");
but when I run there isn't my dock
-
@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 {"