whiteShadow
6th November 2015, 20:58
Hello,
I'm trying to design an interface, and I encounter an issue. I'm trying to create a scene, where I can move a menu inside (with buttons).
Here is an image of what I have:
11504
What I want to achieve, is, when I click somewhere on the scene I move the all menu around the location clicked.
I was able to do that, but the problem was when I tried to click on one of the button form the menu, it was moving the menu (like if I clicked on the scene).
I want the scene to ignore the click (do not move the menu) when I click on one button. I kind of managed to do that too, but then when I click somewhere in the QWidget that contains my buttons, the menu doesn't move.
The big white box on the image containing my button is suppose to be transparent (I just put it white for explanations).
What I would need would be to have the containing QWidget transparent on click events, but not the buttons inside it.
Is it possible to do that ?
Thank you very much.
Edit: I tried to tweak all mouse events in all combinations possible, but it doesn't work. Is it an implementation problem ? Should I replace my QWidget by a QGraphicsGroupItem ? Would it make a difference ?
I'm trying to design an interface, and I encounter an issue. I'm trying to create a scene, where I can move a menu inside (with buttons).
Here is an image of what I have:
11504
What I want to achieve, is, when I click somewhere on the scene I move the all menu around the location clicked.
I was able to do that, but the problem was when I tried to click on one of the button form the menu, it was moving the menu (like if I clicked on the scene).
I want the scene to ignore the click (do not move the menu) when I click on one button. I kind of managed to do that too, but then when I click somewhere in the QWidget that contains my buttons, the menu doesn't move.
The big white box on the image containing my button is suppose to be transparent (I just put it white for explanations).
What I would need would be to have the containing QWidget transparent on click events, but not the buttons inside it.
Is it possible to do that ?
Thank you very much.
Edit: I tried to tweak all mouse events in all combinations possible, but it doesn't work. Is it an implementation problem ? Should I replace my QWidget by a QGraphicsGroupItem ? Would it make a difference ?