Commit 044d1064 authored by captainwong's avatar captainwong

jlib

parent 2349f59a
...@@ -91,6 +91,7 @@ protected: ...@@ -91,6 +91,7 @@ protected:
is_mouse_pressed_ = true; is_mouse_pressed_ = true;
mouse_pressed_pos_ = mapToParent(e->pos()); mouse_pressed_pos_ = mapToParent(e->pos());
} }
virtual void mouseMoveEvent(QMouseEvent* e) override { virtual void mouseMoveEvent(QMouseEvent* e) override {
if (!is_mouse_pressed_)return; if (!is_mouse_pressed_)return;
if (is_maximized_) { if (is_maximized_) {
...@@ -100,6 +101,7 @@ protected: ...@@ -100,6 +101,7 @@ protected:
} }
parentWidget()->move(e->globalPos() - mouse_pressed_pos_); parentWidget()->move(e->globalPos() - mouse_pressed_pos_);
} }
virtual void mouseReleaseEvent(QMouseEvent* e) override { virtual void mouseReleaseEvent(QMouseEvent* e) override {
is_mouse_pressed_ = false; is_mouse_pressed_ = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment