Qt-Advanced-Docking-System/examples/autohidedragndrop/droppableitem.h

20 lines
432 B
C
Raw Normal View History

2024-10-23 04:36:53 +08:00
#include <QObject>
#include <QPushButton>
class QDragEnterEvent;
class QDragLeaveEvent;
class QDropEvent;
class DroppableItem : public QPushButton
{
Q_OBJECT;
public:
DroppableItem(const QString& text = QString(), QWidget* parent = nullptr);
protected:
void dragEnterEvent(QDragEnterEvent* event) override;
void dragLeaveEvent(QDragLeaveEvent* event) override;
void dropEvent(QDropEvent* event) override;
};