40 , m_mainWindow(parent)
42 QVBoxLayout *
const layout =
new QVBoxLayout(
this);
43 layout->setContentsMargins(2, 2, 2, 2);
44 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
49 QAction selectAllAction(tr(
"Select all"));
50 selectAllAction.setShortcut(QKeySequence::SelectAll);
51 BT_CONNECT(&selectAllAction, &QAction::triggered,
55 copyAction.setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
60 menu.addAction(&selectAllAction);
61 menu.addAction(©Action);
62 menu.exec(QCursor::pos());
65 [
this](QUrl
const & url) {
66 auto const decodedLink(
69 if (!decodedLink && !decodedLink->module)
72 auto const *
const m = decodedLink->module;
73 std::unique_ptr<CSwordKey> key(m->createKey());
74 key->setKey(decodedLink->key);
76 setInfo(key->renderedText(), m->language()->abbrev());
A QTextBrowser subclass which adds the ability to start drags for references.