feat: allow dragging frameless window
This commit is contained in:
@@ -42,6 +42,11 @@ private slots:
|
||||
void onTreeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
void onParticleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
void setupTrayIcon();
|
||||
void setupModels();
|
||||
@@ -70,6 +75,10 @@ private:
|
||||
QLabel *m_storageLabel;
|
||||
QLabel *m_pingLabel;
|
||||
QTimer *m_pingTimer;
|
||||
|
||||
// Window dragging
|
||||
QPoint m_dragPosition;
|
||||
bool m_isDragging;
|
||||
};
|
||||
|
||||
#endif // LLINK_MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user