25 lines
551 B
C++
25 lines
551 B
C++
#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)
|
|
{
|
|
Q_UNUSED(event)
|
|
|
|
QRectF Rect(100,100,100,100);
|
|
QPainter Painter(this);
|
|
|
|
Painter.fillRect(Rect,Qt::SolidPattern);
|
|
}
|
|
|