1

I'm trying to find some kind of component or widget to make it appear when I click on the main window. The trick is to make it appear expanding downwards from the click(upper left corner) to the lower right corner. I'm using Qt 4.7.4(32 bits)

thanks already

4

1 回答 1

0

Derive a class from QWidget (or QMainWindow) and reimplement mousePressEvent (or mouseReleaseEvent) in there you can get the position of the click (from the QMouseEvent *event parameter), create the widget you want to show, move it to the position and finally show it.

于 2013-08-31T21:21:38.070 回答