[][src]Struct qt_core::ContextMenuPolicy

#[repr(transparent)]
pub struct ContextMenuPolicy(_);

This enum type defines the various policies a widget can have with respect to showing a context menu.

C++ enum: Qt::ContextMenuPolicy.

C++ documentation:

This enum type defines the various policies a widget can have with respect to showing a context menu.

Methods

impl ContextMenuPolicy[src]

pub fn to_int(&self) -> c_int[src]

impl ContextMenuPolicy[src]

pub const NoContextMenu: ContextMenuPolicy[src]

the widget does not feature a context menu, context menu handling is deferred to the widget's parent. (C++ enum variant: NoContextMenu = 0)

pub const DefaultContextMenu: ContextMenuPolicy[src]

the widget's QWidget::contextMenuEvent() handler is called. (C++ enum variant: DefaultContextMenu = 1)

pub const ActionsContextMenu: ContextMenuPolicy[src]

the widget displays its QWidget::actions() as context menu. (C++ enum variant: ActionsContextMenu = 2)

pub const CustomContextMenu: ContextMenuPolicy[src]

the widget emits the QWidget::customContextMenuRequested() signal. (C++ enum variant: CustomContextMenu = 3)

pub const PreventContextMenu: ContextMenuPolicy[src]

the widget does not feature a context menu, and in contrast to NoContextMenu, the handling is not deferred to the widget's parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself through QWidget::mousePressEvent(), and QWidget::mouseReleaseEvent(). (C++ enum variant: PreventContextMenu = 4)

Trait Implementations

impl Clone for ContextMenuPolicy[src]

impl Copy for ContextMenuPolicy[src]

impl Debug for ContextMenuPolicy[src]

impl Eq for ContextMenuPolicy[src]

impl From<ContextMenuPolicy> for c_int[src]

impl From<i32> for ContextMenuPolicy[src]

impl PartialEq<ContextMenuPolicy> for ContextMenuPolicy[src]

impl StructuralEq for ContextMenuPolicy[src]

impl StructuralPartialEq for ContextMenuPolicy[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.