add: customTabwidget set drag action.

This commit is contained in:
2025-06-17 17:20:54 +08:00
parent 14b06ed6ce
commit a7d0099c3b
6 changed files with 115 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
#ifndef CUSTOM_TABLEWIDET_H
#define CUSTOM_TABLEWIDET_H
#include <QTableWidget>
#include <QDropEvent>
class CustomTableWidget : public QTableWidget
{
Q_OBJECT
public:
explicit CustomTableWidget(QWidget* parent = nullptr);
~CustomTableWidget() override;
protected:
void dropEvent(QDropEvent* event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void startDrag(Qt::DropActions supportedActions) override;
};
#endif