From 2e65f581c67d75a2355de4c3906c0d862e0a9ab0 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 5 Sep 2016 02:57:54 +0200 Subject: Make actions local Define actions in their respective Widgets instead of MainWindow and fix the menus and toolbars accordingly. --- torrentdisplay.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'torrentdisplay.cpp') diff --git a/torrentdisplay.cpp b/torrentdisplay.cpp index 3a1664b..58df338 100644 --- a/torrentdisplay.cpp +++ b/torrentdisplay.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include "torrentdisplay.h" @@ -81,6 +82,12 @@ TorrentDisplay::TorrentDisplay(QWidget *parent, Qt::WindowFlags f) : QDialog(par mainLayout->addLayout(buttonLayout); setLayout(mainLayout); setWindowTitle(tr("Torrent Info")); + + //actions + QAction *copyFnToClip = new QAction(QIcon(":/edit-copy.png"), tr("Filename to Clip"), this); + copyFnToClip->setShortcut(tr("CTRL+C")); + connect(copyFnToClip, SIGNAL(triggered()), this, SLOT(copyToClipboard())); + addActions(QList() << copyFnToClip); } void TorrentDisplay::setData(const QList data, const QString &filename) { -- cgit v1.2.3-70-g09d2