[][src]Struct qt_gui::QStatusTipEvent

#[repr(C)]pub struct QStatusTipEvent { /* fields omitted */ }

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

C++ class: QStatusTipEvent.

C++ documentation:

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

Status tips can be set on a widget using the QWidget::setStatusTip() function. They are shown in the status bar when the mouse cursor enters the widget. For example:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QWidget myWidget = new QWidget; myWidget->setStatusTip(tr("This is my widget."));

setCentralWidget(myWidget); ... }

Widget with status tip.

Status tips can also be set on actions using the QAction::setStatusTip() function:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QMenu fileMenu = menuBar()->addMenu(tr("File"));

QAction *newAct = new QAction(tr("&New"), this); newAct->setStatusTip(tr("Create a new file.")); fileMenu->addAction(newAct); ... }

Action with status tip.

Finally, status tips are supported for the item view classes through the Qt::StatusTipRole enum value.

Methods

impl QStatusTipEvent[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QStatusTipEvent>>
) -> Ref<QStatusTipEvent>
[src]

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

Calls C++ function: QStatusTipEvent& QStatusTipEvent::operator=(const QStatusTipEvent& other).

C++ documentation:

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

Status tips can be set on a widget using the QWidget::setStatusTip() function. They are shown in the status bar when the mouse cursor enters the widget. For example:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QWidget myWidget = new QWidget; myWidget->setStatusTip(tr("This is my widget."));

setCentralWidget(myWidget); ... }

Widget with status tip.

Status tips can also be set on actions using the QAction::setStatusTip() function:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QMenu fileMenu = menuBar()->addMenu(tr("File"));

QAction *newAct = new QAction(tr("&New"), this); newAct->setStatusTip(tr("Create a new file.")); fileMenu->addAction(newAct); ... }

Action with status tip.

Finally, status tips are supported for the item view classes through the Qt::StatusTipRole enum value.

pub unsafe fn new(tip: impl CastInto<Ref<QString>>) -> CppBox<QStatusTipEvent>[src]

Constructs a status tip event with the text specified by tip.

Calls C++ function: [constructor] void QStatusTipEvent::QStatusTipEvent(const QString& tip).

C++ documentation:

Constructs a status tip event with the text specified by tip.

See also tip().

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QStatusTipEvent>>
) -> CppBox<QStatusTipEvent>
[src]

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

Calls C++ function: [constructor] void QStatusTipEvent::QStatusTipEvent(const QStatusTipEvent& other).

C++ documentation:

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

Status tips can be set on a widget using the QWidget::setStatusTip() function. They are shown in the status bar when the mouse cursor enters the widget. For example:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QWidget myWidget = new QWidget; myWidget->setStatusTip(tr("This is my widget."));

setCentralWidget(myWidget); ... }

Widget with status tip.

Status tips can also be set on actions using the QAction::setStatusTip() function:

MainWindow::MainWindow(QWidget parent) : QMainWindow(parent) { QMenu fileMenu = menuBar()->addMenu(tr("File"));

QAction *newAct = new QAction(tr("&New"), this); newAct->setStatusTip(tr("Create a new file.")); fileMenu->addAction(newAct); ... }

Action with status tip.

Finally, status tips are supported for the item view classes through the Qt::StatusTipRole enum value.

pub unsafe fn tip(&self) -> CppBox<QString>[src]

Returns the message to show in the status bar.

Calls C++ function: QString QStatusTipEvent::tip() const.

C++ documentation:

Returns the message to show in the status bar.

See also QStatusBar::showMessage().

Trait Implementations

impl CppDeletable for QStatusTipEvent[src]

unsafe fn delete(&self)[src]

Calls C++ function: virtual [destructor] void QStatusTipEvent::~QStatusTipEvent().

impl Deref for QStatusTipEvent[src]

type Target = QEvent

The resulting type after dereferencing.

fn deref(&self) -> &QEvent[src]

Calls C++ function: QEvent* static_cast<QEvent*>(QStatusTipEvent* ptr).

impl DynamicCast<QStatusTipEvent> for QEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QStatusTipEvent>[src]

Calls C++ function: QStatusTipEvent* dynamic_cast<QStatusTipEvent*>(QEvent* ptr).

impl StaticDowncast<QStatusTipEvent> for QEvent[src]

unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QStatusTipEvent>[src]

Calls C++ function: QStatusTipEvent* static_cast<QStatusTipEvent*>(QEvent* ptr).

impl StaticUpcast<QEvent> for QStatusTipEvent[src]

unsafe fn static_upcast(ptr: Ptr<QStatusTipEvent>) -> Ptr<QEvent>[src]

Calls C++ function: QEvent* static_cast<QEvent*>(QStatusTipEvent* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.