摘要: 在窗口程序中,无边框窗口程序一般需要特殊处理才能拖动Qt中,要实现无边框窗口的拖动,需要重新实现 mousePressEvent 和 mouseMoveEvent 俩虚函数 1 void Widget::mousePressEvent(QMouseEvent *event) 2 { 3 if (event->button() == Qt::LeftButton) { 4 pos = event->globalPos() - frameGeometry().topLeft(); 5 event->accept(); 6 } 7 } 8 9 voi... 阅读全文
posted @ 2013-06-30 01:56 wowk 阅读(1410) 评论(0) 推荐(0) 编辑