mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-24 13:27:45 +00:00
Now it properly "slideshows" just like the real client, instead of being a static image like it was before. The banners are now clickable, but there's still a bug causing the controls to be reloaded twice on startup - delaying the first animation.
17 lines
356 B
C++
17 lines
356 B
C++
#include "bannerwidget.h"
|
|
|
|
#include <QDebug>
|
|
#include <QDesktopServices>
|
|
|
|
BannerWidget::BannerWidget() : QLabel() {
|
|
setCursor(Qt::CursorShape::PointingHandCursor);
|
|
}
|
|
|
|
void BannerWidget::mousePressEvent(QMouseEvent* event) {
|
|
qDebug() << "Clicked!";
|
|
QDesktopServices::openUrl(url);
|
|
}
|
|
|
|
void BannerWidget::setUrl(QUrl url) {
|
|
this->url = url;
|
|
}
|