2022-06-29 10:11:11 -07:00
|
|
|
#include <QToolTip>
|
2022-07-01 15:56:34 -07:00
|
|
|
#include <QVariant>
|
2022-06-29 10:11:11 -07:00
|
|
|
|
|
|
|
#include "qtooltiplabel.h"
|
|
|
|
|
|
|
|
QToolTipLabel::QToolTipLabel(QWidget* parent, Qt::WindowFlags f)
|
|
|
|
: QLabel(parent) {
|
|
|
|
this->setStyleSheet("QToolTip { font-size: 40pt }");
|
|
|
|
}
|
|
|
|
|
|
|
|
QToolTipLabel::~QToolTipLabel() {}
|
|
|
|
|
|
|
|
void QToolTipLabel::mousePressEvent(QMouseEvent * event) {
|
2022-07-01 15:56:34 -07:00
|
|
|
if(QToolTipLabel::property("showToolTip").toString() == "true") {
|
|
|
|
QToolTip::showText(mapToGlobal(QPoint(0, 0)), "<font face='u001' size=-2>" + objectName() + "</font>");
|
|
|
|
}
|
2022-06-29 10:11:11 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void QToolTipLabel::mouseReleaseEvent(QMouseEvent * event) {
|
|
|
|
|
|
|
|
}
|