Masterctrl/Sources/Gui/AppIconWidget.cpp
J-F Martel f4fc549a8a Dev.
2016-01-15 14:43:58 -05:00

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);
}