KXmlGui
ktooltiphelper.cpp
50 connect(&m_toolTipTimeout, &QTimer::timeout, this, &KToolTipHelperPrivate::postToolTipEventIfCursorDidntMove);
105 if (!QToolTip::isVisible() || static_cast<QKeyEvent *>(event)->key() != Qt::Key_Shift || !m_widget) {
114 // We need to explicitly hide the tooltip window before showing the whatsthis because hideText()
115 // runs a timer before hiding. On Wayland when hiding a popup Qt will close all popups opened after
116 // it, including the whatsthis popup here. Unfortunately we can't access the tooltip window/widget
135 QWidget *positioningHelper = new QWidget(menu); // Needs to be alive as long as the help is shown or hyperlinks can't be opened.
137 QWhatsThis::showText(m_lastExpandableToolTipGlobalPos, m_action->whatsThis(), positioningHelper);
209 // Because we set the tool button's tooltip below, we must re-check the whats this, because the shortcut
213 toolButton->setToolTip(i18nc("@info:tooltip %1 is the tooltip of an action, %2 is its keyboard shorcut",
263 qGuiApp->postEvent(widgetUnderCursor, new QHelpEvent(QEvent::ToolTip, widgetUnderCursor->mapFromGlobal(globalCursorPos), globalCursorPos));
267void KToolTipHelperPrivate::showExpandableToolTip(const QPoint &globalPos, const QString &toolTip, const QRect &rect)
static const QString whatsThisHintOnly()
Use this to have a widget show "Press Shift for help." as its tooltip.
Definition ktooltiphelper.cpp:78
bool eventFilter(QObject *watched, QEvent *event) override
Filters QEvent::ToolTip if an enhanced tooltip is available for the widget.
Definition ktooltiphelper.cpp:57
QString i18nc(const char *context, const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
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
QObject(QObject *parent)
void deleteLater()
virtual bool event(QEvent *e)
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-2025 The KDE developers.
Generated on Fri May 2 2025 12:05:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 12:05:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.