#ifndef WIDGET_H
#define WIDGET_H
#include
#include
#include
#include
#include
#include
class Widget : public QWidget { Q_OBJECT public: Widget(QWidget *parent = 0); ~Widget(); protected: void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *evnet); void paintEvent(QPaintEvent *); private: QPoint dragPosition; }; #endif // WIDGET_H #include "widget.h" Widget::Widget(QWidget *
不规则的窗体
![](https://img-home.csdnimg.cn/images/20240711042549.png)