[問題] qt 無邊框視窗移動lag問題

作者: checkIO (chec)   2017-05-13 09:36:58
開發平台(Platform): (Ex: Win10, Linux, ...)
win7
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
vs2015
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
qt5.8
問題(Question):
目前寫的程式要隱藏邊框 又要讓user移動視窗
但目前的寫法會讓視窗在移動的時候頓的很有感覺
下面是我的測試專案
https://drive.google.com/file/d/0B9wZP_c89VEfUzk3LU9XaG9pYW8/view
void dropTest::mouseMoveEvent(QMouseEvent *event) {
if (event->y() < 180)
move(event->pos() - alertView_m_point + pos());
}
void dropTest::mousePressEvent(QMouseEvent *event) {
alertView_m_point = event->pos();
}
想請問有沒有更好的寫法呢?

Links booklink

Contact Us: admin [ a t ] ucptt.com