aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpinfowindow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpinfowindow.hpp')
-rw-r--r--qmidiplayer-desktop/qmpinfowindow.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpinfowindow.hpp b/qmidiplayer-desktop/qmpinfowindow.hpp
index 9a1e389..a76b46b 100644
--- a/qmidiplayer-desktop/qmpinfowindow.hpp
+++ b/qmidiplayer-desktop/qmpinfowindow.hpp
@@ -2,11 +2,29 @@
#define QMPINFOWINDOW_HPP
#include <QDialog>
+#include <QLabel>
+#include <QMouseEvent>
+#include <QApplication>
+#include <QClipboard>
namespace Ui {
class qmpInfoWindow;
}
+class QClickableLabel : public QLabel
+{
+ Q_OBJECT
+ public:
+ explicit QClickableLabel(QWidget *parent=0):QLabel(parent){}
+ protected:
+ void mousePressEvent(QMouseEvent *e)
+ {
+ QLabel::mousePressEvent(e);
+ if(e->buttons()&Qt::LeftButton)
+ QApplication::clipboard()->setText(text());
+ }
+};
+
class qmpInfoWindow : public QDialog
{
Q_OBJECT