-
QWidget post event
I have QWidget containing several child widget.
I only have track of the parent widget and not its childs.
I'd like to emulate a mouse click to a specific position.
So that one of the child widget gets the mouseClick event depending on cursor's position.
Is it possible to emulate that behaviour using postEvent or sendEvent ?
Thanks.
-
Re: QWidget post event
Hi,
> I only have track of the parent widget and not its childs.
QWidget has children() method via which you can get list of child widgets...
> I'd like to emulate a mouse click to a specific position.
>So that one of the child widget gets the mouseClick event
>depending on cursor's position.
If QWidget is the parent and QPushbutton is the child then when you click on QPushbutton then you will get the QPushbutton::mouseClick/Press event...