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. QMenu infrastructure - is deriving an own Menu not an option?
Forum Update on Monday, May 27th 2025

QMenu infrastructure - is deriving an own Menu not an option?

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 5 Posters 614 Views
  • 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.
  • S Offline
    S Offline
    St0fF
    wrote on 13 Jan 2025, 19:35 last edited by
    #1

    When I heard about the concept of Pie Menus in the 90s, I instantly loved it.

    But nowadays that concept got misunderstood in my opinion. A Pie with some Icons is not a menu, it's an Action-Pie ;)

    My interpretation is that when the context menu opens, it arranges its items circularly around the pointer position. You can preset where to start (at which angle), which direction to fill the circle in (clockwise, ccw), how many degrees of a circle may be filled with items, and so on.

    With my QPieMenu I've gotten as far as:

    • actionEvent: realize when actions get added/removed/changed
    • paintEvent: draw what I calculate and animate
    • mouseMoveEvent: hover management

    I've seen from the start of my development, that a lot of the real work in QMenu is done unter the hood within QMenuPrivate. So I'm reimplementing most of the event handlers. There are no menu-specific virtual methods in QMenu (well, the sizeHint() is one, though).
    Anyhow - I see no clean way of using the existing QMenu infrastructure with a QMenu-derived class. Am I right?

    If I'm right, it would mean I have to implement opening submenus and so on, like everything. [Any ideas where I could get a job with this?]

    1 Reply Last reply
    1
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 Jan 2025, 19:57 last edited by
      #2

      Hi,

      Did you already saw the Qt Quarterly about the pie menu ?

      There might be stuff in there of interest.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • S Offline
        S Offline
        St0fF
        wrote on 14 Jan 2025, 10:39 last edited by St0fF
        #3

        Thank you very much, I read this like 20 years ago, that was about the time I started using Qt as my preferred gear ;)

        But that is what I meant by "the concept got misunderstood". A big round Button with Actions...

        20 years ago fullHD was a rare resolution - we didn't have as much screenspace as today. Thus we had to somehow pack on-screen, what was needed within minimal bounds. Times have changed, though...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 14 Jan 2025, 19:48 last edited by
          #4

          Would you have a picture to share with the result you want to achieve ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            St0fF
            wrote on 16 Jan 2025, 02:33 last edited by
            #5

            Actually, I'm pretty close to achieve what I'm trying to achieve, I may realease it shortly on github. Although, thinking it over again, maybe a screenshot or executable is better for finding a good job ;)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gaobo
              wrote on 16 Jan 2025, 11:12 last edited by
              #6

              I'm very interested in this pie menu๐ŸŒš๐ŸŒš

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SimonSchroeder
                wrote on 17 Jan 2025, 07:58 last edited by
                #7

                You got me hooked. I'm really curious how you expect the pie menu to look differently than the ones we all know. Please share a screenshot.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  St0fF
                  wrote on 17 Jan 2025, 10:05 last edited by
                  #8

                  Please no pressure - it's not far enough, yet. Working on a more flexible placement algorithm, so submenus open in a way that it feels "right".

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    St0fF
                    wrote on 21 Jan 2025, 12:37 last edited by
                    #9

                    When everything is animated, it surely can get messy very quickly... So it's hard to find out what didn't work...

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mizmas
                      wrote on 21 Jan 2025, 23:44 last edited by Mizmas
                      #10

                      As an alternative approach, there is an unofficial qml plugin to integrate rive animations in your qt app: https://github.com/basysKom/RiveQtQuickPlugin

                      Here's me loading a .qml file with a rive item into a PyQt6 application, every interaction is handled with rive.

                      alt text

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        St0fF
                        wrote on 22 Jan 2025, 08:47 last edited by
                        #11

                        Just a quick follow-up: which screen-recorder did you use?

                        M 1 Reply Last reply 22 Jan 2025, 10:57
                        0
                        • S St0fF
                          22 Jan 2025, 08:47

                          Just a quick follow-up: which screen-recorder did you use?

                          M Offline
                          M Offline
                          Mizmas
                          wrote on 22 Jan 2025, 10:57 last edited by
                          #12

                          @St0fF https://getsharex.com/

                          Additionally, here's some wheel menus that I found, so if you're good with design and animation concepts, it's pretty easy to replicate without complicated coding:

                          https://rive.app/community/files/5432-10752-ability-wheel-in-the-legend-of-zelda-tears-of-the-kingdom-totk/

                          https://rive.app/community/files/12837-24302-radial-menu-hud-games-interactive/

                          https://rive.app/community/files/6949-13806-vr-interaction/

                          1 Reply Last reply
                          1
                          • S Offline
                            S Offline
                            St0fF
                            wrote on 25 Jan 2025, 14:31 last edited by St0fF
                            #13

                            https://www.dropbox.com/scl/fi/gf1j6pdtt4qn3s9p3ou3m/PieMenuTesting_mwkquR9RV4.mp4?rlkey=xgjy3s04abhaat9eocklde6pl&dl=0

                            I had to remove my zoom & evade- code, as it didn't work right, yet. But there you can get an idea of what I believe it should look like...

                            And here's another Video - you can see it doesn't help much not to be able to use the QMenuPrivate infrastructure, as QPieMenu has no way to tell, if it was caused by another menu or not (context). Still looks cool ;)
                            https://www.dropbox.com/scl/fi/w4b4402k3l7yp8by4mwxq/PieMenuTesting_Wl9kcndwHo.mp4?rlkey=1yylqzywz23p60tafaau0hao3&dl=0

                            And in Windows-Style:
                            ![https://i.imgur.com/c40QMYT.gif](image url)

                            1 Reply Last reply
                            1
                            • S Offline
                              S Offline
                              St0fF
                              wrote on 31 Jan 2025, 19:46 last edited by
                              #14

                              Hello Guys and Gals,

                              after 4 weeks of spare-time-coding I think I reached a beta stage with my QPieMenu. I added GPL v3 Licensing, so I could open up the source to the public without violating Qt's license - here you go: https://github.com/the-Obsessed-Maniacs/PieMenuTesting

                              Current screen-recordings:
                              https://www.dropbox.com/scl/fi/wljg5cuo1g9mzt8f8whp9/PieMenuTesting_XFlrB0X1mt.mp4?rlkey=ltxl544gxa074w586ytzgqo8r&dl=0

                              @Qt Talent Acquisition Team: I am looking for a job!

                              • 30 years programming experience
                              • 25 years C++/OpenGL
                              • using Qt as "my framework" since Qt 4.7
                              • 8 years professional C++/Qt/OpenGL experience as Senior Software Engineer, creating an extensive Autodesk (R) Maya Plugin, which was used to build ALL series graphics for BMW iDrive5, iDrive6, iDrive7 and iDrive8 (also including Mini and RollsRoyce)
                              S 1 Reply Last reply 31 Jan 2025, 19:48
                              0
                              • S St0fF
                                31 Jan 2025, 19:46

                                Hello Guys and Gals,

                                after 4 weeks of spare-time-coding I think I reached a beta stage with my QPieMenu. I added GPL v3 Licensing, so I could open up the source to the public without violating Qt's license - here you go: https://github.com/the-Obsessed-Maniacs/PieMenuTesting

                                Current screen-recordings:
                                https://www.dropbox.com/scl/fi/wljg5cuo1g9mzt8f8whp9/PieMenuTesting_XFlrB0X1mt.mp4?rlkey=ltxl544gxa074w586ytzgqo8r&dl=0

                                @Qt Talent Acquisition Team: I am looking for a job!

                                • 30 years programming experience
                                • 25 years C++/OpenGL
                                • using Qt as "my framework" since Qt 4.7
                                • 8 years professional C++/Qt/OpenGL experience as Senior Software Engineer, creating an extensive Autodesk (R) Maya Plugin, which was used to build ALL series graphics for BMW iDrive5, iDrive6, iDrive7 and iDrive8 (also including Mini and RollsRoyce)
                                S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 31 Jan 2025, 19:48 last edited by
                                #15

                                @St0fF you should check the openings on the Qt Group website.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0

                                1/15

                                13 Jan 2025, 19:35

                                • Login

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