Masterctrl/Sources/Gui/AppIconWidget.cpp
2015-12-17 18:53:13 -05:00

23 lines
530 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)
{
QRectF Rect(100,100,100,100);
QPainter Painter(this);
Painter.fillRect(Rect,Qt::SolidPattern);
}