Qt:Документация 4.3.2/qhoverevent

Материал из Wiki.crossplatform.ru

Версия от 09:52, 12 января 2009; Root (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QHoverEvent Class Reference
[модуль QtGui ]

The QHoverEvent class contains parameters that describe a mouse event. Далее...

 #include <QHoverEvent>

Inherits QEvent.

[править] Открытые функции

  • QHoverEvent ( Type type, const QPoint & pos, const QPoint & oldPos )
  • const QPoint & oldPos () const
  • const QPoint & pos () const
  • 6 public functions inherited from QEvent

[править] Дополнительные унаследованные члены


[править] Подробное описание

The QHoverEvent class contains parameters that describe a mouse event.

Mouse events occur when a mouse cursor is moved into, out of, or within a widget, and if the widget has the Qt::WA_Hover attribute.

The function pos() gives the current cursor position, while oldPos() gives the old mouse position.


[править] Описание функций-членов

[править]
QHoverEvent::QHoverEvent ( Type type, const QPoint & pos, const QPoint & oldPos )

Constructs a hover event object.

The type parameter must be QEvent::HoverEnter, QEvent::HoverLeave, or QEvent::HoverMove.

The pos is the current mouse cursor's position relative to the receiving widget, while oldPos is the previous mouse cursor's position relative to the receiving widget.

[править]
const QPoint & QHoverEvent::oldPos () const

Returns the previous position of the mouse cursor, relative to the widget that received the event. If there is no previous position, oldPos() will return the same position as pos().

On QEvent::HoverEnter events, this position will always be QPoint(-1, -1).

See also pos().

[править]
const QPoint & QHoverEvent::pos () const

Returns the position of the mouse cursor, relative to the widget that received the event.

On QEvent::HoverLeave events, this position will always be QPoint(-1, -1).

See also oldPos().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2