2025-10-29 17:23:30 +08:00
|
|
|
|
#ifndef QMYTREEWIDGET_H
|
|
|
|
|
|
#define QMYTREEWIDGET_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
|
|
#include <QMimeData>
|
|
|
|
|
|
#include <QDrag>
|
|
|
|
|
|
|
|
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
|
|
|
|
|
|
|
|
class QMyTreeWidget : public QTreeWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
QMyTreeWidget(QWidget *parent = nullptr);
|
|
|
|
|
|
~QMyTreeWidget();
|
|
|
|
|
|
|
2025-12-16 16:33:56 +08:00
|
|
|
|
QString getCurrentItemString();
|
2026-04-10 06:38:45 +08:00
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
|
void closeTreeEditor();
|
|
|
|
|
|
|
2025-10-29 17:23:30 +08:00
|
|
|
|
protected:
|
|
|
|
|
|
virtual void startDrag(Qt::DropActions supportedActions);
|
2026-04-07 13:53:01 +08:00
|
|
|
|
virtual void closeEditor ( QWidget * editor, QAbstractItemDelegate::EndEditHint hint );
|
2025-10-29 17:23:30 +08:00
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // QMYTREEWIDGET_H
|