#ifndef IMAGEWIDGET_NODRAG_H
#define IMAGEWIDGET_NODRAG_H

#include <QWidget>

namespace Ui {
class ImageWidget_nodrag;
}

class ImageWidget_nodrag : public QWidget
{
    Q_OBJECT

public:
    explicit ImageWidget_nodrag(QWidget *parent = nullptr);
    ~ImageWidget_nodrag();

    void setPixmap(const QPixmap& pixmap);

protected:
    void paintEvent(QPaintEvent *event) override;


private:
    Ui::ImageWidget_nodrag *ui;
    QPixmap pixmap;
    QPoint imageOffset;  // 图片的偏移量

};

#endif // IMAGEWIDGET_NODRAG_H
