Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. how to make slide menu over widget
Forum Updated to NodeBB v4.3 + New Features

how to make slide menu over widget

Scheduled Pinned Locked Moved Unsolved Qt for Python
9 Posts 2 Posters 1.6k 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.
  • P Offline
    P Offline
    Pythonic person
    wrote on last edited by
    #1

    Hello, i have a design for a drawing application containing canvas and tools for drawing shapes, What I want is to make a slide menu that won't affect canvas and it should be fixed at the right button, as in the following image.
    Untitled.png image URL)

    What I've done so far is: I added a QFrame as a container above the canvas and added layout so they will be always at right, But this did NOT work the canvas doesn't work because there is a QFrame above it. So how can I make it works?

    IS it possible to do that with Qt Designer?

    Am using Pyqt5

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean you want to be able to interact with the canevas through that frame ?

      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
      • P Offline
        P Offline
        Pythonic person
        wrote on last edited by
        #3

        Yes, Because the right frame is not allowed to interact with the canvas because it is above it I guess.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You could use the ˋQt::WA_TransparentForMouseEvents` property.

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

          P 2 Replies Last reply
          0
          • SGaistS SGaist

            You could use the ˋQt::WA_TransparentForMouseEvents` property.

            P Offline
            P Offline
            Pythonic person
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • SGaistS SGaist

              You could use the ˋQt::WA_TransparentForMouseEvents` property.

              P Offline
              P Offline
              Pythonic person
              wrote on last edited by Pythonic person
              #6

              @SGaist Thank you it worked, but another problem happened, The buttons now can't be pressed because of that attribute. So how can I do that, I believe I did something not correct or what do you think?

              EDIT
              I added that attribute to the parent Frame, and now the child buttons and frames can't work.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by SGaist
                #7

                You seem to want the butter and the money of the butter.

                Can you explain what is the use of that slide menu (drawer ?) that is supposed to stay on top of the canevas, be transparent so that the mouse can be used through it but at the same time one should be able to click on the buttons that are on it.

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

                P 1 Reply Last reply
                0
                • SGaistS SGaist

                  You seem to want the butter and the money of the butter.

                  Can you explain what is the use of that slide menu (drawer ?) that is supposed to stay on top of the canevas, be transparent so that the mouse can be used through it but at the same time one should be able to click on the buttons that are on it.

                  P Offline
                  P Offline
                  Pythonic person
                  wrote on last edited by
                  #8

                  You seem to want the butter, the money of the butter and the daughter of the milkman.

                  LOL, Am sorry about that.

                  Can you explain what is the use of that slide menu (drawer ?) that is supposed to stay on top of the canvas, be transparent so that the mouse can be used through it but at the same time one should be able to click on the buttons that are on it.

                  Well, As the image shows I have a canvas for drawing shapes and on the right side I have two menus, one is fixed (not a slide-type) and the other menu is at the bottom is a slide menu user can click on it and it will go the left showing multiple buttons.

                  The problem is: I add these two menus above the canvas by using a child Frame, and I did it, But then I faced the problem, that the canvas can't interact with mouse event because there are other (the layer above the canvas) here we mean the menus_Frame. This is the main problem.

                  And then you suggested using

                  You could use the ˋQt::WA_TransparentForMouseEvents` property.

                  And that's worked for the canvas, but the menues_buttons are no longer able to use them because of that property.

                  HINT: i added that property to the frame_menu so i think it applied on all the child, that's why the buttons are no longer available to be pressed.

                  What i want is:
                  canvas can interact with mouse event at anywhere in the window and the canvas_frame is the parent, And these menu can be used with clicking even if they are above the canvas

                  I hope i did explain it clear :D

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    One thing that will not be possible is to have the full canevas accessible through these hovering menus and have them usable at the same time.

                    Usually, in painting applications, you have the canevas that is free of anything. If you have stuff like drawers that are opened, they are either beside the canevas or if on top of it, they do not allow the access what is directly underneath or they simply hide when losing focus.

                    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

                    • Login

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