Fix compiling against recent Qt 5
This commit is contained in:
parent
aeb43180f0
commit
d56a6d47db
|
@ -10,7 +10,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
||||||
set(META_APP_DESCRIPTION "Simple video downloader with Qt GUI (currently only YouTube and Vimeo are maintained)")
|
set(META_APP_DESCRIPTION "Simple video downloader with Qt GUI (currently only YouTube and Vimeo are maintained)")
|
||||||
set(META_VERSION_MAJOR 1)
|
set(META_VERSION_MAJOR 1)
|
||||||
set(META_VERSION_MINOR 3)
|
set(META_VERSION_MINOR 3)
|
||||||
set(META_VERSION_PATCH 3)
|
set(META_VERSION_PATCH 4)
|
||||||
|
|
||||||
# add project files
|
# add project files
|
||||||
set(HEADER_FILES
|
set(HEADER_FILES
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QStylePainter>
|
#include <QStylePainter>
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
namespace QtGui {
|
namespace QtGui {
|
||||||
|
|
||||||
|
@ -22,12 +23,10 @@ DownloadWidget::~DownloadWidget()
|
||||||
|
|
||||||
void DownloadWidget::paintEvent(QPaintEvent *)
|
void DownloadWidget::paintEvent(QPaintEvent *)
|
||||||
{
|
{
|
||||||
if (true) {
|
QStylePainter painter(this);
|
||||||
QStylePainter painter(this);
|
QStyleOptionFocusRect option;
|
||||||
QStyleOptionFocusRect option;
|
option.initFrom(this);
|
||||||
option.initFrom(this);
|
option.backgroundColor = palette().color(QPalette::Highlight);
|
||||||
option.backgroundColor = palette().color(QPalette::Highlight);
|
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
|
||||||
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue