code format
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
#ifndef UWIDGET_H
|
||||
#define UWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "qad_graphic_export.h"
|
||||
|
||||
#include <QEvent>
|
||||
#include <QPainter>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QEvent>
|
||||
#include "qad_graphic_export.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
class QAD_GRAPHIC_EXPORT UWidget: public QWidget
|
||||
{
|
||||
class QAD_GRAPHIC_EXPORT UWidget: public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UWidget(QWidget * parent = 0): QWidget(parent) {}
|
||||
|
||||
|
||||
private:
|
||||
virtual bool event(QEvent * e) {
|
||||
if (e->type() != QEvent::Paint) return QWidget::event(e);
|
||||
@@ -27,7 +28,7 @@ private:
|
||||
#endif
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
emit paintEvent((QPaintEvent * )e);
|
||||
emit paintEvent((QPaintEvent *)e);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -51,7 +52,6 @@ signals:
|
||||
void showEvent(QShowEvent * e);
|
||||
void wheelEvent(QWheelEvent * e);
|
||||
void paintEvent(QPaintEvent * e);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user