mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-27 00:11:33 +08:00
20 lines
432 B
C++
20 lines
432 B
C++
#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;
|
|
};
|