本页内容

QIconDragEvent Class

QIconDragEvent 类表示主图标拖动操作已开始。更多内容...

头文件: #include <QIconDragEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
继承自: QEvent

公共函数

受保护函数

QIconDragEvent(QIconDragEvent &&)
QIconDragEvent &operator=(QIconDragEvent &&)
QIconDragEvent &operator=(const QIconDragEvent &other)

详细说明

当窗口的主图标被拖出时,图标拖动事件会发送给小部件。在 macOS 上,当窗口的代理图标被拖出标题栏时,就会发生这种情况。

通常会响应此事件来开始使用拖放功能。

另请参阅 “拖放”(Drag and Drop)、QMimeData 以及QDrag 。

成员函数文档

QIconDragEvent::QIconDragEvent()

构建一个图标拖动事件对象,并将 accept 标志设置为 false。

另请参阅 accept()。

[protected delete] QIconDragEvent::QIconDragEvent(QIconDragEvent &&)

通过移动构造方式创建一个QIconDragEvent 的实例。该函数已被删除。

[protected delete] QIconDragEvent &QIconDragEvent::operator=(QIconDragEvent &&)

将other 按移动赋值给此QIconDragEvent 实例。该函数已被删除。

[noexcept protected default] QIconDragEvent &QIconDragEvent::operator=(const QIconDragEvent &other)

将other 复制并赋值给此QIconDragEvent 实例。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.