yolobs-studio/UI/url-push-button.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
397 B
C++
Raw Normal View History

2020-03-25 08:07:22 +00:00
#pragma once
#include <QPushButton>
#include <QUrl>
class UrlPushButton : public QPushButton {
Q_OBJECT
Q_PROPERTY(QUrl targetUrl READ targetUrl WRITE setTargetUrl)
public:
inline UrlPushButton(QWidget *parent = nullptr) : QPushButton(parent) {}
void setTargetUrl(QUrl url);
QUrl targetUrl();
protected:
void mousePressEvent(QMouseEvent *event) override;
private:
QUrl m_targetUrl;
};