1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/test/testbodymover/qqtbodymover.h

45 lines
1.2 KiB
C
Raw Normal View History

#ifndef QQTBODYMOVER_H
#define QQTBODYMOVER_H
#include <QObject>
//#include "qqt-local.h"
#define QQTSHARED_EXPORT
/**
* @brief The QQtBodyMover class
*
*
* 使
* QWidget* w;//需要锁定鼠标的窗口。
* w->setMouseTracking(True);//不必要
* //w->setFocusPolicy(Qt::StrongFocus);//不必要设置Focus。
* QQtBodyMover* helper = new QQtBodyMover(parent) ;
* w->installEventFilter(helper);//一步设置即可。
* 使
*
*
* move的时候使
* QWidget及其子类QMainWindow
* windowsmacOSLinux等桌面操作系统
*/
class QQtBodyMoverPrivate;
class QQTSHARED_EXPORT QQtBodyMover : public QObject
{
Q_OBJECT
public:
QQtBodyMover ( QObject* parent = 0 );
~QQtBodyMover();
// QObject interface
public:
virtual bool eventFilter ( QObject* watched, QEvent* event ) override;
private:
QQtBodyMoverPrivate* d_ptr;
Q_DECLARE_PRIVATE ( QQtBodyMover )
};
#endif // QQTBODYMOVER_H