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_VERSION_MAJOR 1)
|
||||
set(META_VERSION_MINOR 3)
|
||||
set(META_VERSION_PATCH 3)
|
||||
set(META_VERSION_PATCH 4)
|
||||
|
||||
# add project files
|
||||
set(HEADER_FILES
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <QMouseEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QStylePainter>
|
||||
#include <QStyleOption>
|
||||
|
||||
namespace QtGui {
|
||||
|
||||
|
@ -22,12 +23,10 @@ DownloadWidget::~DownloadWidget()
|
|||
|
||||
void DownloadWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
if (true) {
|
||||
QStylePainter painter(this);
|
||||
QStyleOptionFocusRect option;
|
||||
option.initFrom(this);
|
||||
option.backgroundColor = palette().color(QPalette::Highlight);
|
||||
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
|
||||
}
|
||||
QStylePainter painter(this);
|
||||
QStyleOptionFocusRect option;
|
||||
option.initFrom(this);
|
||||
option.backgroundColor = palette().color(QPalette::Highlight);
|
||||
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue