aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpinfowindow.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-21 22:11:04 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-21 22:11:04 +0800
commit7457599cb1bbf1d28b4b29bc12d07801b37ad410 (patch)
treea30e82fb183df006ed1a209d021e151b9d887bb1 /qmidiplayer-desktop/qmpinfowindow.hpp
parent32568af90e5c521c68432a7e77b6dd8bf524adde (diff)
downloadQMidiPlayer-7457599cb1bbf1d28b4b29bc12d07801b37ad410.tar.xz
Minor UI changes.
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