#ifndef CTEXTEDIT_H
#define CTEXTEDIT_H

#include <QTextEdit>

class CTextEdit : public QTextEdit
{
    Q_OBJECT
public:  
    explicit CTextEdit(QWidget *parent = nullptr);
    explicit CTextEdit(const QString & str, QWidget *parent = nullptr);

    /**
    * @brief 设置文件拖拽过滤
    **/
    void setDragFilter(QStringList list);

protected:
    void dropEvent(QDropEvent *e) override;
    void dragEnterEvent(QDragEnterEvent *e) override;

private:
    QStringList mDragListFilter;
};

#endif // CTEXTEDIT_H
