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. Widgets in the window frame (titlebar)
Forum Updated to NodeBB v4.3 + New Features

Widgets in the window frame (titlebar)

Scheduled Pinned Locked Moved General and Desktop
qmainwindowaerowindows
7 Posts 4 Posters 4.8k Views 2 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.
  • J Offline
    J Offline
    jjan
    wrote on last edited by jjan
    #1

    Hey,
    for my next project I want to have some widgets in the window frame like Autodesk's 3ds Max is doing it

    Imgur

    Is this possible using Qt? I don't want to use a customized titlebar, I want them to be directly on the window frame like in 3ds Max or any other software doing this (AutoCAD, Word 2010, please know I don't mean Ribbon). Is there an special class? Any Qt version can be used (prefer 5.x but 4.x is also ok).

    ~ jan

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex_malyu
      wrote on last edited by alex_malyu
      #2

      All below is true according to my knowledge, but my knowledge is limited to what I know :)

      If you are talking about area within red it is called quick access toolbar and is a part of ribbon implementation under the Windows.
      https://msdn.microsoft.com/en-us/library/windows/desktop/dd940502(v=vs.85).aspx
      So your question is asked about ribbon even though you say it was not.

      And since system draws the frame the only way to have it in Qt (at least cross-platform )
      I can imagine is to have frameless window, draw the titlebar and borders and handle window resizing yourself.

      Sorry if this was not the answer you were looking for.

      1 Reply Last reply
      1
      • J Offline
        J Offline
        jjan
        wrote on last edited by
        #3

        @alex_malyu Yea this looks like that what I am lookin' for. But what I meant in generally is if its possible to take a QWidget like QPushButton and place it in the titlebar, so don't use of Ribbon.

        1 Reply Last reply
        0
        • fecubF Offline
          fecubF Offline
          fecub
          wrote on last edited by fecub
          #4

          Yes it's possible without using Ribbonbar. Here is an template on github
          https://github.com/fecub/qt-borderless/tree/master/src

          In titlebar.cpp, you can add controls, layouts, views and so on.

          This is what I'm created from the template: http://imgur.com/uKzRLN0

          1 Reply Last reply
          2
          • J Offline
            J Offline
            jjan
            wrote on last edited by
            #5

            thx, but what i want is to use the default window not to create an customized one, simply the Base window but take some widgets and place them in the titlebar like the Firefox button in the old Firefox versions.

            1 Reply Last reply
            0
            • Chris KawaC Online
              Chris KawaC Online
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #6

              As this was discussed many times on the forum already I'll just cut it short and send you to the search button:

              Is it possible - yes.
              Is it easy - no.
              can it be done with Qt alone - no, it requires native APIs at some point, even when using QtWinExtras module. The reason is that frame is a non-client, native window manager space and Qt has no direct access to it without native "hacks".

              J 1 Reply Last reply
              2
              • Chris KawaC Chris Kawa

                As this was discussed many times on the forum already I'll just cut it short and send you to the search button:

                Is it possible - yes.
                Is it easy - no.
                can it be done with Qt alone - no, it requires native APIs at some point, even when using QtWinExtras module. The reason is that frame is a non-client, native window manager space and Qt has no direct access to it without native "hacks".

                J Offline
                J Offline
                jjan
                wrote on last edited by
                #7

                @Chris-Kawa I have found some threads (like https://forum.qt.io/topic/3765/moved-painting-in-the-nonclientarea) but the link to http://developer.qt.nokia.com/forums/viewthread/3331/ is dead and this very bad.

                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