comp:Drag-and-drop implementation in the interface is bound to the sending logic.

This commit is contained in:
2025-06-22 01:17:44 +08:00
parent fd8bb4c9f1
commit 1f9275ed72
8 changed files with 332 additions and 23 deletions

View File

@@ -1,8 +1,10 @@
#ifndef CP_TABLEWIDET_H
#define CP_TABLEWIDET_H
#include <QTableWidget>
#include <QAction>
#include <QDropEvent>
#include <QMenu>
#include <QTableWidget>
class CpTableWidget : public QTableWidget
{
@@ -14,6 +16,14 @@ public:
protected:
void dropEvent(QDropEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event);
void contextMenuEvent(QContextMenuEvent* event) override;
private slots:
void deleteSelectedRows();
private:
QMenu* contexMenu_;
QAction* delAction_;
};
#endif // CP_TABLEWIDET_H
#endif // CP_TABLEWIDET_H