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. Is it possible to add toolbuttons in title bar of MainWindow?
Qt 6.11 is out! See what's new in the release blog

Is it possible to add toolbuttons in title bar of MainWindow?

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 5.3k Views 1 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.
  • T Offline
    T Offline
    Tabi
    wrote on last edited by
    #1

    I want to add tool buttons to the title bar of the QMainWindow. But I found there is no any direct method to do that. Any suggestion to do this?

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      since the window frame is handled by the OS you don't have a chance to add it with Qt yet.
      You will need to implement your own window frame with Qt widgets to do so.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tabi
        wrote on last edited by
        #3

        Oh thank you. Means setting FramelessWindowHint and then have to make frame. :|

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tanmay2227
          wrote on last edited by
          #4

          you can make a custom toolbar widget and add it. i have worked on something simlar and so this may work

          Tanmay Priyadarshi

          1 Reply Last reply
          0
          • raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            exactly.

            Found "this ":http://www.codeproject.com/articles/415102/winforms-form-skin(for windows) on the web.
            You may want to "add a feature request":https://bugreports.qt-project.org and hope it will be implemented in QtWindowsExtras module sometime :)

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

              You can also implement it and add a merge request to Qt :-)

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • T Offline
                T Offline
                Tabi
                wrote on last edited by
                #7

                [quote author="tanmay2227" date="1381833704"]you can make a custom toolbar widget and add it. i have worked on something simlar and so this may work[/quote]

                Thank you so much for hint. I am trying this idea.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Tabi
                  wrote on last edited by
                  #8

                  [quote author="raven-worx" date="1381833725"]exactly.

                  Found "this ":http://www.codeproject.com/articles/415102/winforms-form-skin(for windows) on the web.
                  You may want to "add a feature request":https://bugreports.qt-project.org and hope it will be implemented in QtWindowsExtras module sometime :)[/quote]

                  raven :) thanks alot for the link that is exactly I wanted. Though the code seems a bit more than what I wanted but I am going to dig it to get the idea.
                  Also Thanks for link for feature request and idea of Qt Windows Extras but I checked it is not available in 4.8.10 that is I am using, anyways in future it will be a point to keep in mind. Thanks again.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Tabi
                    wrote on last edited by
                    #9

                    [quote author="Gerolf" date="1381846821"]You can also implement it and add a merge request to Qt :-)[/quote]

                    I will try if I could code so efficient. Thanks for the idea.

                    1 Reply Last reply
                    0

                    • Login

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