videodownloader/gui/downloadwidget.cpp

34 lines
669 B
C++
Raw Normal View History

2015-09-08 17:05:59 +02:00
#include "./downloadwidget.h"
2015-12-05 22:56:32 +01:00
#include "ui_downloadwidget.h"
2015-04-22 19:32:04 +02:00
2017-05-01 03:22:50 +02:00
#include <QMessageBox>
2015-04-22 19:32:04 +02:00
#include <QMouseEvent>
2017-05-01 03:22:50 +02:00
#include <QPaintEvent>
2015-04-22 19:32:04 +02:00
#include <QStylePainter>
namespace QtGui {
2017-05-01 03:22:50 +02:00
DownloadWidget::DownloadWidget(QWidget *parent)
: QWidget(parent)
, m_ui(new Ui::DownloadWidget)
2015-04-22 19:32:04 +02:00
{
m_ui->setupUi(this);
}
DownloadWidget::~DownloadWidget()
2017-05-01 03:22:50 +02:00
{
}
2015-04-22 19:32:04 +02:00
void DownloadWidget::paintEvent(QPaintEvent *)
{
2017-05-01 03:22:50 +02:00
if (true) {
2015-04-22 19:32:04 +02:00
QStylePainter painter(this);
QStyleOptionFocusRect option;
option.initFrom(this);
option.backgroundColor = palette().color(QPalette::Highlight);
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
}
}
}