修正大量demo
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class frmMoveWidget;
|
||||
namespace Ui {
|
||||
class frmMoveWidget;
|
||||
}
|
||||
|
||||
class frmMoveWidget : public QWidget
|
||||
|
||||
@@ -55,14 +55,6 @@ bool MoveWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
return QObject::eventFilter(watched, event);
|
||||
}
|
||||
|
||||
void MoveWidget::setWidget(QWidget *widget)
|
||||
{
|
||||
if (this->widget == 0) {
|
||||
this->widget = widget;
|
||||
this->widget->installEventFilter(this);
|
||||
}
|
||||
}
|
||||
|
||||
void MoveWidget::setLeftButton(bool leftButton)
|
||||
{
|
||||
this->leftButton = leftButton;
|
||||
@@ -72,3 +64,11 @@ void MoveWidget::setInControl(bool inControl)
|
||||
{
|
||||
this->inControl = inControl;
|
||||
}
|
||||
|
||||
void MoveWidget::setWidget(QWidget *widget)
|
||||
{
|
||||
if (this->widget == 0) {
|
||||
this->widget = widget;
|
||||
this->widget->installEventFilter(this);
|
||||
}
|
||||
}
|
||||
@@ -3,21 +3,15 @@
|
||||
|
||||
/**
|
||||
* 通用控件移动类 作者:feiyangqingyun(QQ:517216493) 2019-9-28
|
||||
* 1:可以指定需要移动的widget
|
||||
* 2:可设置是否限定鼠标左键拖动
|
||||
* 3:支持任意widget控件
|
||||
* 1. 可以指定需要移动的widget
|
||||
* 2. 可设置是否限定鼠标左键拖动
|
||||
* 3. 支持任意widget控件
|
||||
*/
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#ifdef quc
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5,7,0))
|
||||
#include <QtDesigner/QDesignerExportWidget>
|
||||
#else
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#endif
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT MoveWidget : public QObject
|
||||
class Q_DECL_EXPORT MoveWidget : public QObject
|
||||
#else
|
||||
class MoveWidget : public QObject
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user