how to make slide menu over widget
-
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.
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
-
Hi,
Do you mean you want to be able to interact with the canevas through that frame ?
-
Yes, Because the right frame is not allowed to interact with the canvas because it is above it I guess.
-
You could use the ˋQt::WA_TransparentForMouseEvents` property.
-
This post is deleted!
-
@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. -
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.
-
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 canvasI hope i did explain it clear :D
-
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.