zxq1996 |
2017-08-29 11:35 |
求各位大侠,点击主窗口的按钮,希望子窗口从主窗口下面缓缓滑出。
现在通过下面代码能够实现窗口缓缓滑出的效果,但是从主窗口的上面滑出的,希望能从主窗口的底部滑出,请各位大侠帮忙,谢谢了。
QPropertyAnimation *animation = new QPropertyAnimation(pFrmGameSel, "geometry"); animation->setDuration(1000); animation->setKeyValueAt(0,QRect(0, 0, 450, 700)); animation->setEndValue(QRect(450, 0, 450, 700)); animation->start(); pFrmGameSel->show(); |
|