Voip.MS dev
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "AppIconWidget.h"
|
||||
#include <Qpainter>
|
||||
|
||||
|
||||
CAppIconWidget::CAppIconWidget()
|
||||
{
|
||||
setWindowFlags(Qt::Popup | Qt::FramelessWindowHint);
|
||||
setParent(0); // Create TopLevel-Widget
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setAttribute(Qt::WA_PaintOnScreen); // not needed in Qt 5.2 and up
|
||||
}
|
||||
|
||||
|
||||
void CAppIconWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QRectF Rect(100,100,100,100);
|
||||
QPainter Painter(this);
|
||||
|
||||
Painter.fillRect(Rect,Qt::SolidPattern);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef CAPPICONWIDGET_H
|
||||
#define CAPPICONWIDGET_H
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include <QWidget>
|
||||
|
||||
class CAppIconWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CAppIconWidget();
|
||||
|
||||
|
||||
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
#endif // CAPPICONWIDGET_H
|
||||
Reference in New Issue
Block a user