KXmlGui
ktooltiphelper.cpp
51 connect(&m_toolTipTimeout, &QTimer::timeout, this, &KToolTipHelperPrivate::postToolTipEventIfCursorDidntMove);
100 m_toolTipTimeout.start(menu->style()->styleHint(QStyle::SH_ToolTip_WakeUpDelay, nullptr, menu));
106 if (!QToolTip::isVisible() || static_cast<QKeyEvent *>(event)->key() != Qt::Key_Shift || !m_widget) {
115 // We need to explicitly hide the tooltip window before showing the whatsthis because hideText()
116 // runs a timer before hiding. On Wayland when hiding a popup Qt will close all popups opened after
117 // it, including the whatsthis popup here. Unfortunately we can't access the tooltip window/widget
136 QWidget *positioningHelper = new QWidget(menu); // Needs to be alive as long as the help is shown or hyperlinks can't be opened.
138 QWhatsThis::showText(m_lastExpandableToolTipGlobalPos, m_action->whatsThis(), positioningHelper);
210 // Because we set the tool button's tooltip below, we must re-check the whats this, because the shortcut
214 toolButton->setToolTip(i18nc("@info:tooltip %1 is the tooltip of an action, %2 is its keyboard shorcut",
264 qGuiApp->postEvent(widgetUnderCursor, new QHelpEvent(QEvent::ToolTip, widgetUnderCursor->mapFromGlobal(globalCursorPos), globalCursorPos));
268void KToolTipHelperPrivate::showExpandableToolTip(const QPoint &globalPos, const QString &toolTip, const QRect &rect)
281 i18nc("@info:tooltip", "<small><font color=\"%1\">Press <b>Shift</b> for more Info.</font></small>", hintTextColor.name());
295 i18nc("@info:tooltip keep short", "%1<br/><small><font color=\"%2\">Press <b>Shift</b> for more.</font></small>", toolTip, hintTextColor.name())
InactiveText
Tooltip
QBrush foreground(ForegroundRole=NormalText) const
static const QString whatsThisHintOnly()
Use this to have a widget show "Press Shift for help." as its tooltip.
Definition ktooltiphelper.cpp:79
bool eventFilter(QObject *watched, QEvent *event) override
Filters QEvent::ToolTip if an enhanced tooltip is available for the widget.
Definition ktooltiphelper.cpp:58
QString i18nc(const char *context, const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
const QColor & color() const const
QString name(NameFormat format) const const
QPoint pos()
bool openUrl(const QUrl &url)
Hide
QWindowList allWindows()
QWindow * focusWindow()
const QPoint & globalPos() const const
int globalX() const const
int globalY() const const
const QPoint & pos() const const
int x() const const
int y() const const
NativeText
void deleteLater()
virtual bool event(QEvent *e)
Normal
int height() const const
int width() const const
int y() const const
const QChar at(qsizetype position) const const
bool isEmpty() const const
qsizetype size() const const
SH_ToolTip_WakeUpDelay
virtual int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const const=0
Key_Shift
RightToLeft
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void timeout()
void hideText()
bool isVisible()
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
void showText(const QPoint &pos, const QString &text, QWidget *w)
void setGeometry(const QRect &)
layoutDirection
QStyle * style() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.