Changeset View
Changeset View
Standalone View
Standalone View
src/tagcheckbox.cpp
Show All 33 Lines | 33 | TagCheckBox::TagCheckBox(const QString& tag, QWidget* parent) | |||
---|---|---|---|---|---|
34 | : QWidget( parent ), | 34 | : QWidget( parent ), | ||
35 | m_label(nullptr), | 35 | m_label(nullptr), | ||
36 | m_tag(tag), | 36 | m_tag(tag), | ||
37 | m_urlHover(false) | 37 | m_urlHover(false) | ||
38 | { | 38 | { | ||
39 | QHBoxLayout* layout = new QHBoxLayout(this); | 39 | QHBoxLayout* layout = new QHBoxLayout(this); | ||
40 | layout->setContentsMargins(0, 0, 0, 0); | 40 | layout->setContentsMargins(0, 0, 0, 0); | ||
41 | 41 | | |||
42 | m_label = new QLabel(tag.split('/', QString::SkipEmptyParts).last(), this); | 42 | m_label = new QLabel(tag.split(QLatin1Char('/'), QString::SkipEmptyParts).last(), this); | ||
43 | m_label->setToolTip(tag); | 43 | m_label->setToolTip(tag); | ||
44 | m_label->setMouseTracking(true); | 44 | m_label->setMouseTracking(true); | ||
45 | m_label->setTextFormat(Qt::PlainText); | 45 | m_label->setTextFormat(Qt::PlainText); | ||
46 | m_label->setForegroundRole(parent->foregroundRole()); | 46 | m_label->setForegroundRole(parent->foregroundRole()); | ||
47 | m_child = m_label; | 47 | m_child = m_label; | ||
48 | 48 | | |||
49 | m_child->installEventFilter( this ); | 49 | m_child->installEventFilter( this ); | ||
50 | m_child->setMouseTracking(true); | 50 | m_child->setMouseTracking(true); | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |