Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can I create a frame with qt?
Forum Updated to NodeBB v4.3 + New Features

Can I create a frame with qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
35 Posts 4 Posters 5.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by mrjj
    #8

    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_examples

    For home made simple version, see
    https://github.com/martijnkoopman/Qt-Ribbon-Widget

    V 2 Replies Last reply
    7
    • mrjjM mrjj

      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_examples

      For home made simple version, see
      https://github.com/martijnkoopman/Qt-Ribbon-Widget

      V Offline
      V Offline
      vale88
      wrote on last edited by
      #9

      @mrjj I like the last example, THANKS

      1 Reply Last reply
      0
      • mrjjM mrjj

        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_examples

        For home made simple version, see
        https://github.com/martijnkoopman/Qt-Ribbon-Widget

        V Offline
        V Offline
        vale88
        wrote on last edited by vale88
        #10

        @mrjj a question...I want a frame on the left..but I don't understand how I must add it:
        I did:
        Cattura.PNG

        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

        V 1 Reply Last reply
        0
        • V vale88

          @mrjj a question...I want a frame on the left..but I don't understand how I must add it:
          I did:
          Cattura.PNG

          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

          V Offline
          V Offline
          vale88
          wrote on last edited by vale88
          #11

          @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:
          Cattura.PNG

          I must put object on vertical

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #12

            Hi
            I dont think sample supports vertical alignment.
            The paint code does not seems to support it.

            V 1 Reply Last reply
            1
            • mrjjM mrjj

              Hi
              I dont think sample supports vertical alignment.
              The paint code does not seems to support it.

              V Offline
              V Offline
              vale88
              wrote on last edited by
              #13

              @mrjj thanks, only a question, if I wanto to change color, there is a gray, I want to put pink, where must I change?

              mrjjM 1 Reply Last reply
              0
              • V vale88

                @mrjj thanks, only a question, if I wanto to change color, there is a gray, I want to put pink, where must I change?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #14

                @vale88
                Hi
                Well RibbonGroupGroup first.
                Use stylesheet.
                alt text

                I didnt check what rest of the grey is. i assume its the TabWidget.

                V 1 Reply Last reply
                3
                • mrjjM mrjj

                  @vale88
                  Hi
                  Well RibbonGroupGroup first.
                  Use stylesheet.
                  alt text

                  I didnt check what rest of the grey is. i assume its the TabWidget.

                  V Offline
                  V Offline
                  vale88
                  wrote on last edited by
                  #15

                  @mrjj Can I see how did you write?

                  mrjjM 1 Reply Last reply
                  0
                  • V vale88

                    @mrjj Can I see how did you write?

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #16

                    @vale88
                    Hi
                    I just open the Ui file and right click on top widget and then
                    change style sheet and then click background color

                    alt text

                    V 1 Reply Last reply
                    2
                    • mrjjM mrjj

                      @vale88
                      Hi
                      I just open the Ui file and right click on top widget and then
                      change style sheet and then click background color

                      alt text

                      V Offline
                      V Offline
                      vale88
                      wrote on last edited by
                      #17

                      ok thanks

                      mrjjM 1 Reply Last reply
                      0
                      • V vale88

                        ok thanks

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #18

                        @vale88
                        Also the same for
                        alt text

                        RibbonTabContent

                        V 1 Reply Last reply
                        1
                        • mrjjM mrjj

                          @vale88
                          Also the same for
                          alt text

                          RibbonTabContent

                          V Offline
                          V Offline
                          vale88
                          wrote on last edited by
                          #19

                          @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?

                          mrjjM 1 Reply Last reply
                          0
                          • V vale88

                            @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?

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #20

                            @vale88
                            You mean on the tabs?
                            or on the buttons Open , New etc ?

                            V 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              @vale88
                              You mean on the tabs?
                              or on the buttons Open , New etc ?

                              V Offline
                              V Offline
                              vale88
                              wrote on last edited by
                              #21

                              @mrjj on the button Open, New..ecc..when I push there is an effect

                              Pl45m4P 1 Reply Last reply
                              0
                              • V vale88

                                @mrjj on the button Open, New..ecc..when I push there is an effect

                                Pl45m4P Offline
                                Pl45m4P Offline
                                Pl45m4
                                wrote on last edited by
                                #22

                                @vale88

                                What kind of effect? Animation? Fading? Or just the button changes?


                                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                                ~E. W. Dijkstra

                                V 1 Reply Last reply
                                0
                                • Pl45m4P Pl45m4

                                  @vale88

                                  What kind of effect? Animation? Fading? Or just the button changes?

                                  V Offline
                                  V Offline
                                  vale88
                                  wrote on last edited by
                                  #23

                                  @Pl45m4 Maybe I solved:
                                  ui->toolButton->setStyleSheet("QToolButton { background-color: beige }");

                                  1 Reply Last reply
                                  0
                                  • mrjjM Offline
                                    mrjjM Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #24

                                    Hi
                                    Its actually just normal QToolButtons with
                                    autoRaise set to true.

                                    V 1 Reply Last reply
                                    0
                                    • mrjjM mrjj

                                      Hi
                                      Its actually just normal QToolButtons with
                                      autoRaise set to true.

                                      V Offline
                                      V Offline
                                      vale88
                                      wrote on last edited by
                                      #25

                                      @mrjj Cattura.PNG

                                      I don't know how change gray color that have black border

                                      V 1 Reply Last reply
                                      0
                                      • V vale88

                                        @mrjj Cattura.PNG

                                        I don't know how change gray color that have black border

                                        V Offline
                                        V Offline
                                        vale88
                                        wrote on last edited by vale88
                                        #26

                                        @vale88 Cattura.PNG

                                        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

                                        mrjjM 1 Reply Last reply
                                        0
                                        • V vale88

                                          @vale88 Cattura.PNG

                                          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

                                          mrjjM Offline
                                          mrjjM Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on last edited by mrjj
                                          #27

                                          @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 {"

                                          alt text

                                          V 1 Reply Last reply
                                          2

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved