Skip to main content

QGuiApplication

Struct QGuiApplication 

Source
pub struct QGuiApplication { /* private fields */ }
Expand description

C++ class: QGuiApplication.

Implementations§

Source§

impl QGuiApplication

Source

pub fn init<F: FnOnce(Ptr<QGuiApplication>) -> i32>(f: F) -> !

A convenience function for performing proper initialization and de-initialization of a Qt application.

This function creates a QGuiApplication object with valid argc and argv, calls the passed closure f(app) with the application object and exits the process with the exit code returned by the closure. The closure should perform the initialization of the application and either return immediately or call QGuiApplication::exec() and return its return value:

use qt_gui::QGuiApplication;

fn main() {
    QGuiApplication::init(|app| {
        unsafe {
            // initialization goes here
            QGuiApplication::exec()
        }
    })
}
Source§

impl QGuiApplication

Source

pub fn font_database_changed(&self) -> Signal<()>

Returns a built-in Qt signal QGuiApplication::fontDatabaseChanged that can be passed to qt_core::Signal::connect.

Source

pub fn screen_added(&self) -> Signal<(*mut QScreen,)>

Returns a built-in Qt signal QGuiApplication::screenAdded that can be passed to qt_core::Signal::connect.

Source

pub fn screen_removed(&self) -> Signal<(*mut QScreen,)>

Returns a built-in Qt signal QGuiApplication::screenRemoved that can be passed to qt_core::Signal::connect.

Source

pub fn primary_screen_changed(&self) -> Signal<(*mut QScreen,)>

Returns a built-in Qt signal QGuiApplication::primaryScreenChanged that can be passed to qt_core::Signal::connect.

Source

pub fn last_window_closed(&self) -> Signal<()>

Returns a built-in Qt signal QGuiApplication::lastWindowClosed that can be passed to qt_core::Signal::connect.

Source

pub fn focus_object_changed(&self) -> Signal<(*mut QObject,)>

Returns a built-in Qt signal QGuiApplication::focusObjectChanged that can be passed to qt_core::Signal::connect.

Source

pub fn focus_window_changed(&self) -> Signal<(*mut QWindow,)>

Returns a built-in Qt signal QGuiApplication::focusWindowChanged that can be passed to qt_core::Signal::connect.

Source

pub fn application_state_changed(&self) -> Signal<(ApplicationState,)>

Returns a built-in Qt signal QGuiApplication::applicationStateChanged that can be passed to qt_core::Signal::connect.

Source

pub fn layout_direction_changed(&self) -> Signal<(LayoutDirection,)>

Returns a built-in Qt signal QGuiApplication::layoutDirectionChanged that can be passed to qt_core::Signal::connect.

Source

pub fn commit_data_request(&self) -> Signal<(*mut QSessionManager,)>

Returns a built-in Qt signal QGuiApplication::commitDataRequest that can be passed to qt_core::Signal::connect.

Source

pub fn save_state_request(&self) -> Signal<(*mut QSessionManager,)>

Returns a built-in Qt signal QGuiApplication::saveStateRequest that can be passed to qt_core::Signal::connect.

Source

pub fn palette_changed(&self) -> Signal<(*const QPalette,)>

Returns a built-in Qt signal QGuiApplication::paletteChanged that can be passed to qt_core::Signal::connect.

Source

pub fn application_display_name_changed(&self) -> Signal<()>

Returns a built-in Qt signal QGuiApplication::applicationDisplayNameChanged that can be passed to qt_core::Signal::connect.

Source

pub fn font_changed(&self) -> Signal<(*const QFont,)>

Returns a built-in Qt signal QGuiApplication::fontChanged that can be passed to qt_core::Signal::connect.

Source

pub unsafe fn all_windows() -> CppBox<QListOfQWindow>

Calls C++ function: static QList<QWindow*> QGuiApplication::allWindows().

Source

pub unsafe fn application_display_name() -> CppBox<QString>

Calls C++ function: static QString QGuiApplication::applicationDisplayName().

Source

pub unsafe fn application_state() -> ApplicationState

Calls C++ function: static Qt::ApplicationState QGuiApplication::applicationState().

Source

pub unsafe fn change_override_cursor(arg1: impl CastInto<Ref<QCursor>>)

Calls C++ function: static void QGuiApplication::changeOverrideCursor(const QCursor& arg1).

Source

pub unsafe fn clipboard() -> QPtr<QClipboard>

Calls C++ function: static QClipboard* QGuiApplication::clipboard().

Source

pub unsafe fn desktop_file_name() -> CppBox<QString>

Calls C++ function: static QString QGuiApplication::desktopFileName().

Source

pub unsafe fn desktop_settings_aware() -> bool

Calls C++ function: static bool QGuiApplication::desktopSettingsAware().

Source

pub unsafe fn device_pixel_ratio(&self) -> c_double

Calls C++ function: double QGuiApplication::devicePixelRatio() const.

Source

pub unsafe fn exec() -> c_int

Calls C++ function: static int QGuiApplication::exec().

Source

pub unsafe fn focus_object() -> QPtr<QObject>

Calls C++ function: static QObject* QGuiApplication::focusObject().

Source

pub unsafe fn focus_window() -> QPtr<QWindow>

Calls C++ function: static QWindow* QGuiApplication::focusWindow().

Source

pub unsafe fn font() -> CppBox<QFont>

Calls C++ function: static QFont QGuiApplication::font().

Source

pub unsafe fn high_dpi_scale_factor_rounding_policy() -> HighDpiScaleFactorRoundingPolicy

Calls C++ function: static Qt::HighDpiScaleFactorRoundingPolicy QGuiApplication::highDpiScaleFactorRoundingPolicy().

Source

pub unsafe fn input_method() -> QPtr<QInputMethod>

Calls C++ function: static QInputMethod* QGuiApplication::inputMethod().

Source

pub unsafe fn is_fallback_session_management_enabled() -> bool

Calls C++ function: static bool QGuiApplication::isFallbackSessionManagementEnabled().

Source

pub unsafe fn is_left_to_right() -> bool

Calls C++ function: static bool QGuiApplication::isLeftToRight().

Source

pub unsafe fn is_right_to_left() -> bool

Calls C++ function: static bool QGuiApplication::isRightToLeft().

Source

pub unsafe fn is_saving_session(&self) -> bool

Calls C++ function: bool QGuiApplication::isSavingSession() const.

Source

pub unsafe fn is_session_restored(&self) -> bool

Calls C++ function: bool QGuiApplication::isSessionRestored() const.

Source

pub unsafe fn keyboard_modifiers() -> QFlags<KeyboardModifier>

Calls C++ function: static QFlags<Qt::KeyboardModifier> QGuiApplication::keyboardModifiers().

Source

pub unsafe fn layout_direction() -> LayoutDirection

Calls C++ function: static Qt::LayoutDirection QGuiApplication::layoutDirection().

Source

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>

Calls C++ function: virtual const QMetaObject* QGuiApplication::metaObject() const.

Source

pub unsafe fn modal_window() -> QPtr<QWindow>

Calls C++ function: static QWindow* QGuiApplication::modalWindow().

Source

pub unsafe fn mouse_buttons() -> QFlags<MouseButton>

Calls C++ function: static QFlags<Qt::MouseButton> QGuiApplication::mouseButtons().

Source

pub unsafe fn new_3a( argc: *mut c_int, argv: *mut *mut c_char, arg3: c_int, ) -> QBox<QGuiApplication>

Calls C++ function: [constructor] void QGuiApplication::QGuiApplication(int& argc, char** argv, int arg3 = …).

Source

pub unsafe fn new_2a( argc: *mut c_int, argv: *mut *mut c_char, ) -> QBox<QGuiApplication>

Calls C++ function: [constructor] void QGuiApplication::QGuiApplication(int& argc, char** argv).

Source

pub unsafe fn notify( &self, arg1: impl CastInto<Ptr<QObject>>, arg2: impl CastInto<Ptr<QEvent>>, ) -> bool

Calls C++ function: virtual bool QGuiApplication::notify(QObject* arg1, QEvent* arg2).

Source

pub unsafe fn override_cursor() -> Ptr<QCursor>

Calls C++ function: static QCursor* QGuiApplication::overrideCursor().

Source

pub unsafe fn palette() -> CppBox<QPalette>

Calls C++ function: static QPalette QGuiApplication::palette().

Source

pub unsafe fn platform_function( function: impl CastInto<Ref<QByteArray>>, ) -> Option<extern "C" fn()>

Calls C++ function: static void (*FN_PTR)() QGuiApplication::platformFunction(const QByteArray& function).

Source

pub unsafe fn platform_name() -> CppBox<QString>

Calls C++ function: static QString QGuiApplication::platformName().

Source

pub unsafe fn primary_screen() -> QPtr<QScreen>

Calls C++ function: static QScreen* QGuiApplication::primaryScreen().

Source

pub unsafe fn qt_metacall( &self, arg1: Call, arg2: c_int, arg3: *mut *mut c_void, ) -> c_int

Calls C++ function: virtual int QGuiApplication::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

Source

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void

Calls C++ function: virtual void* QGuiApplication::qt_metacast(const char* arg1).

Source

pub unsafe fn query_keyboard_modifiers() -> QFlags<KeyboardModifier>

Calls C++ function: static QFlags<Qt::KeyboardModifier> QGuiApplication::queryKeyboardModifiers().

Source

pub unsafe fn quit_on_last_window_closed() -> bool

Calls C++ function: static bool QGuiApplication::quitOnLastWindowClosed().

Source

pub unsafe fn restore_override_cursor()

Calls C++ function: static void QGuiApplication::restoreOverrideCursor().

Source

pub unsafe fn screen_at(point: impl CastInto<Ref<QPoint>>) -> QPtr<QScreen>

Calls C++ function: static QScreen* QGuiApplication::screenAt(const QPoint& point).

Source

pub unsafe fn screens() -> CppBox<QListOfQScreen>

Calls C++ function: static QList<QScreen*> QGuiApplication::screens().

Source

pub unsafe fn session_id(&self) -> CppBox<QString>

Calls C++ function: QString QGuiApplication::sessionId() const.

Source

pub unsafe fn session_key(&self) -> CppBox<QString>

Calls C++ function: QString QGuiApplication::sessionKey() const.

Source

pub unsafe fn set_application_display_name(name: impl CastInto<Ref<QString>>)

Calls C++ function: static void QGuiApplication::setApplicationDisplayName(const QString& name).

Source

pub unsafe fn set_desktop_file_name(name: impl CastInto<Ref<QString>>)

Calls C++ function: static void QGuiApplication::setDesktopFileName(const QString& name).

Source

pub unsafe fn set_desktop_settings_aware(on: bool)

Calls C++ function: static void QGuiApplication::setDesktopSettingsAware(bool on).

Source

pub unsafe fn set_fallback_session_management_enabled(arg1: bool)

Calls C++ function: static void QGuiApplication::setFallbackSessionManagementEnabled(bool arg1).

Source

pub unsafe fn set_font(arg1: impl CastInto<Ref<QFont>>)

Calls C++ function: static void QGuiApplication::setFont(const QFont& arg1).

Source

pub unsafe fn set_high_dpi_scale_factor_rounding_policy( policy: HighDpiScaleFactorRoundingPolicy, )

Calls C++ function: static void QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy).

Source

pub unsafe fn set_layout_direction(direction: LayoutDirection)

Calls C++ function: static void QGuiApplication::setLayoutDirection(Qt::LayoutDirection direction).

Source

pub unsafe fn set_override_cursor(arg1: impl CastInto<Ref<QCursor>>)

Calls C++ function: static void QGuiApplication::setOverrideCursor(const QCursor& arg1).

Source

pub unsafe fn set_palette(pal: impl CastInto<Ref<QPalette>>)

Calls C++ function: static void QGuiApplication::setPalette(const QPalette& pal).

Source

pub unsafe fn set_quit_on_last_window_closed(quit: bool)

Calls C++ function: static void QGuiApplication::setQuitOnLastWindowClosed(bool quit).

Source

pub unsafe fn set_window_icon(icon: impl CastInto<Ref<QIcon>>)

Calls C++ function: static void QGuiApplication::setWindowIcon(const QIcon& icon).

Source

pub unsafe fn static_meta_object() -> Ref<QMetaObject>

Returns a reference to the staticMetaObject field.

Source

pub unsafe fn style_hints() -> QPtr<QStyleHints>

Calls C++ function: static QStyleHints* QGuiApplication::styleHints().

Source

pub unsafe fn sync()

Calls C++ function: static void QGuiApplication::sync().

Source

pub unsafe fn top_level_at(pos: impl CastInto<Ref<QPoint>>) -> QPtr<QWindow>

Calls C++ function: static QWindow* QGuiApplication::topLevelAt(const QPoint& pos).

Source

pub unsafe fn top_level_windows() -> CppBox<QListOfQWindow>

Calls C++ function: static QList<QWindow*> QGuiApplication::topLevelWindows().

Source

pub unsafe fn tr( s: *const c_char, c: *const c_char, n: c_int, ) -> CppBox<QString>

Calls C++ function: static QString QGuiApplication::tr(const char* s, const char* c, int n).

Source

pub unsafe fn tr_utf8( s: *const c_char, c: *const c_char, n: c_int, ) -> CppBox<QString>

Calls C++ function: static QString QGuiApplication::trUtf8(const char* s, const char* c, int n).

Source

pub unsafe fn window_icon() -> CppBox<QIcon>

Calls C++ function: static QIcon QGuiApplication::windowIcon().

Methods from Deref<Target = QCoreApplication>§

Source

pub fn slot_quit(&self) -> Receiver<()>

Returns a built-in Qt slot QCoreApplication::quit that can be passed to qt_core::Signal::connect.

Source

pub fn about_to_quit(&self) -> Signal<()>

Returns a built-in Qt signal QCoreApplication::aboutToQuit that can be passed to qt_core::Signal::connect.

Source

pub fn organization_name_changed(&self) -> Signal<()>

Returns a built-in Qt signal QCoreApplication::organizationNameChanged that can be passed to qt_core::Signal::connect.

Source

pub fn organization_domain_changed(&self) -> Signal<()>

Returns a built-in Qt signal QCoreApplication::organizationDomainChanged that can be passed to qt_core::Signal::connect.

Source

pub fn application_name_changed(&self) -> Signal<()>

Returns a built-in Qt signal QCoreApplication::applicationNameChanged that can be passed to qt_core::Signal::connect.

Source

pub fn application_version_changed(&self) -> Signal<()>

Returns a built-in Qt signal QCoreApplication::applicationVersionChanged that can be passed to qt_core::Signal::connect.

Source

pub unsafe fn install_native_event_filter( &self, filter_obj: impl CastInto<Ptr<QAbstractNativeEventFilter>>, )

Calls C++ function: void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter* filterObj).

Source

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>

Calls C++ function: virtual const QMetaObject* QCoreApplication::metaObject() const.

Source

pub unsafe fn notify( &self, arg1: impl CastInto<Ptr<QObject>>, arg2: impl CastInto<Ptr<QEvent>>, ) -> bool

Calls C++ function: virtual bool QCoreApplication::notify(QObject* arg1, QEvent* arg2).

Source

pub unsafe fn qt_metacall( &self, arg1: Call, arg2: i32, arg3: *mut *mut c_void, ) -> i32

Calls C++ function: virtual int QCoreApplication::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

Source

pub unsafe fn qt_metacast(&self, arg1: *const i8) -> *mut c_void

Calls C++ function: virtual void* QCoreApplication::qt_metacast(const char* arg1).

Source

pub unsafe fn remove_native_event_filter( &self, filter_obj: impl CastInto<Ptr<QAbstractNativeEventFilter>>, )

Calls C++ function: void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter* filterObj).

Methods from Deref<Target = QObject>§

Source

pub unsafe fn find_child<T>( &self, name: &str, ) -> Result<QPtr<T>, FindChildError>

Finds a child of self with the specified object name and casts it to type T.

The search is performed recursively. If there is more than one child matching the search, the most direct ancestor is returned. If there are several direct ancestors, it is undefined which one will be returned.

Returns an error if there is no child object with object name name or the found object cannot be cast to T.

Source

pub fn destroyed(&self) -> Signal<(*mut QObject,)>

Returns a built-in Qt signal QObject::destroyed that can be passed to qt_core::Signal::connect.

Source

pub fn object_name_changed(&self) -> Signal<(*const QString,)>

Returns a built-in Qt signal QObject::objectNameChanged that can be passed to qt_core::Signal::connect.

Source

pub fn slot_delete_later(&self) -> Receiver<()>

Returns a built-in Qt slot QObject::deleteLater that can be passed to qt_core::Signal::connect.

Source

pub unsafe fn block_signals(&self, b: bool) -> bool

Calls C++ function: bool QObject::blockSignals(bool b).

Source

pub unsafe fn children(&self) -> Ref<QListOfQObject>

Calls C++ function: const QList<QObject*>& QObject::children() const.

Source

pub unsafe fn delete_later(&self)

Calls C++ function: [slot] void QObject::deleteLater().

Source

pub unsafe fn disconnect_char_q_object_char( &self, signal: *const i8, receiver: impl CastInto<Ptr<QObject>>, member: *const i8, ) -> bool

Calls C++ function: bool QObject::disconnect(const char* signal = …, const QObject* receiver = …, const char* member = …) const.

Source

pub unsafe fn disconnect_q_object_char( &self, receiver: impl CastInto<Ptr<QObject>>, member: *const i8, ) -> bool

Calls C++ function: bool QObject::disconnect(const QObject* receiver, const char* member = …) const.

Source

pub unsafe fn disconnect_char_q_object( &self, signal: *const i8, receiver: impl CastInto<Ptr<QObject>>, ) -> bool

Calls C++ function: bool QObject::disconnect(const char* signal = …, const QObject* receiver = …) const.

Source

pub unsafe fn disconnect_char(&self, signal: *const i8) -> bool

Calls C++ function: bool QObject::disconnect(const char* signal = …) const.

Source

pub unsafe fn disconnect(&self) -> bool

Calls C++ function: bool QObject::disconnect() const.

Source

pub unsafe fn disconnect_q_object( &self, receiver: impl CastInto<Ptr<QObject>>, ) -> bool

Calls C++ function: bool QObject::disconnect(const QObject* receiver) const.

Source

pub unsafe fn dump_object_info_mut(&self)

Calls C++ function: void QObject::dumpObjectInfo().

Source

pub unsafe fn dump_object_info(&self)

Calls C++ function: void QObject::dumpObjectInfo() const.

Source

pub unsafe fn dump_object_tree_mut(&self)

Calls C++ function: void QObject::dumpObjectTree().

Source

pub unsafe fn dump_object_tree(&self)

Calls C++ function: void QObject::dumpObjectTree() const.

Source

pub unsafe fn dynamic_property_names(&self) -> CppBox<QListOfQByteArray>

Calls C++ function: QList<QByteArray> QObject::dynamicPropertyNames() const.

Source

pub unsafe fn eq(&self, p: impl CastInto<Ref<QPointerOfQObject>>) -> bool

Calls C++ function: bool operator==(QObject* o, const QPointer<QObject>& p).

Source

pub unsafe fn event(&self, event: impl CastInto<Ptr<QEvent>>) -> bool

Calls C++ function: virtual bool QObject::event(QEvent* event).

Source

pub unsafe fn event_filter( &self, watched: impl CastInto<Ptr<QObject>>, event: impl CastInto<Ptr<QEvent>>, ) -> bool

Calls C++ function: virtual bool QObject::eventFilter(QObject* watched, QEvent* event).

Source

pub unsafe fn find_child_q_object_2a( &self, a_name: impl CastInto<Ref<QString>>, options: QFlags<FindChildOption>, ) -> QPtr<QObject>

Calls C++ function: QObject* QObject::findChild<QObject*>(const QString& aName = …, QFlags<Qt::FindChildOption> options = …) const.

Source

pub unsafe fn find_child_q_object_1a( &self, a_name: impl CastInto<Ref<QString>>, ) -> QPtr<QObject>

Calls C++ function: QObject* QObject::findChild<QObject*>(const QString& aName = …) const.

Source

pub unsafe fn find_child_q_object_0a(&self) -> QPtr<QObject>

Calls C++ function: QObject* QObject::findChild<QObject*>() const.

Source

pub unsafe fn find_children_q_object_q_string_q_flags_find_child_option( &self, a_name: impl CastInto<Ref<QString>>, options: QFlags<FindChildOption>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QString& aName = …, QFlags<Qt::FindChildOption> options = …) const.

Source

pub unsafe fn find_children_q_object_q_reg_exp_q_flags_find_child_option( &self, re: impl CastInto<Ref<QRegExp>>, options: QFlags<FindChildOption>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QRegExp& re, QFlags<Qt::FindChildOption> options = …) const.

Source

pub unsafe fn find_children_q_object_q_regular_expression_q_flags_find_child_option( &self, re: impl CastInto<Ref<QRegularExpression>>, options: QFlags<FindChildOption>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QRegularExpression& re, QFlags<Qt::FindChildOption> options = …) const.

Source

pub unsafe fn find_children_q_object_q_string( &self, a_name: impl CastInto<Ref<QString>>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QString& aName = …) const.

Source

pub unsafe fn find_children_q_object(&self) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>() const.

Source

pub unsafe fn find_children_q_object_q_reg_exp( &self, re: impl CastInto<Ref<QRegExp>>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QRegExp& re) const.

Source

pub unsafe fn find_children_q_object_q_regular_expression( &self, re: impl CastInto<Ref<QRegularExpression>>, ) -> CppBox<QListOfQObject>

Calls C++ function: QList<QObject*> QObject::findChildren<QObject*>(const QRegularExpression& re) const.

Source

pub unsafe fn inherits(&self, classname: *const i8) -> bool

Calls C++ function: bool QObject::inherits(const char* classname) const.

Source

pub unsafe fn install_event_filter( &self, filter_obj: impl CastInto<Ptr<QObject>>, )

Calls C++ function: void QObject::installEventFilter(QObject* filterObj).

Source

pub unsafe fn is_widget_type(&self) -> bool

Calls C++ function: bool QObject::isWidgetType() const.

Source

pub unsafe fn is_window_type(&self) -> bool

Calls C++ function: bool QObject::isWindowType() const.

Source

pub unsafe fn kill_timer(&self, id: i32)

Calls C++ function: void QObject::killTimer(int id).

Source

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>

Calls C++ function: virtual const QMetaObject* QObject::metaObject() const.

Source

pub unsafe fn move_to_thread(&self, thread: impl CastInto<Ptr<QThread>>)

Calls C++ function: void QObject::moveToThread(QThread* thread).

Source

pub unsafe fn object_name(&self) -> CppBox<QString>

Calls C++ function: QString QObject::objectName() const.

Source

pub unsafe fn parent(&self) -> QPtr<QObject>

Calls C++ function: QObject* QObject::parent() const.

Source

pub unsafe fn property(&self, name: *const i8) -> CppBox<QVariant>

Calls C++ function: QVariant QObject::property(const char* name) const.

Source

pub unsafe fn qt_metacall( &self, arg1: Call, arg2: i32, arg3: *mut *mut c_void, ) -> i32

Calls C++ function: virtual int QObject::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

Source

pub unsafe fn qt_metacast(&self, arg1: *const i8) -> *mut c_void

Calls C++ function: virtual void* QObject::qt_metacast(const char* arg1).

Source

pub unsafe fn remove_event_filter(&self, obj: impl CastInto<Ptr<QObject>>)

Calls C++ function: void QObject::removeEventFilter(QObject* obj).

Source

pub unsafe fn set_object_name(&self, name: impl CastInto<Ref<QString>>)

Calls C++ function: void QObject::setObjectName(const QString& name).

Source

pub unsafe fn set_parent(&self, parent: impl CastInto<Ptr<QObject>>)

Calls C++ function: void QObject::setParent(QObject* parent).

Source

pub unsafe fn set_property( &self, name: *const i8, value: impl CastInto<Ref<QVariant>>, ) -> bool

Calls C++ function: bool QObject::setProperty(const char* name, const QVariant& value).

Source

pub unsafe fn signals_blocked(&self) -> bool

Calls C++ function: bool QObject::signalsBlocked() const.

Source

pub unsafe fn start_timer_2a(&self, interval: i32, timer_type: TimerType) -> i32

Calls C++ function: int QObject::startTimer(int interval, Qt::TimerType timerType = …).

Source

pub unsafe fn start_timer_1a(&self, interval: i32) -> i32

Calls C++ function: int QObject::startTimer(int interval).

Source

pub unsafe fn thread(&self) -> QPtr<QThread>

Calls C++ function: QThread* QObject::thread() const.

Trait Implementations§

Source§

impl CppDeletable for QGuiApplication

Source§

unsafe fn delete(&self)

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

Source§

impl Deref for QGuiApplication

Source§

fn deref(&self) -> &QCoreApplication

Calls C++ function: QCoreApplication* static_cast<QCoreApplication*>(QGuiApplication* ptr).

Source§

type Target = QCoreApplication

The resulting type after dereferencing.
Source§

impl DynamicCast<QGuiApplication> for QCoreApplication

Source§

unsafe fn dynamic_cast(ptr: Ptr<QCoreApplication>) -> Ptr<QGuiApplication>

Calls C++ function: QGuiApplication* dynamic_cast<QGuiApplication*>(QCoreApplication* ptr).

Source§

impl DynamicCast<QGuiApplication> for QObject

Source§

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGuiApplication>

Calls C++ function: QGuiApplication* dynamic_cast<QGuiApplication*>(QObject* ptr).

Source§

impl StaticDowncast<QGuiApplication> for QCoreApplication

Source§

unsafe fn static_downcast(ptr: Ptr<QCoreApplication>) -> Ptr<QGuiApplication>

Calls C++ function: QGuiApplication* static_cast<QGuiApplication*>(QCoreApplication* ptr).

Source§

impl StaticDowncast<QGuiApplication> for QObject

Source§

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGuiApplication>

Calls C++ function: QGuiApplication* static_cast<QGuiApplication*>(QObject* ptr).

Source§

impl StaticUpcast<QCoreApplication> for QGuiApplication

Source§

unsafe fn static_upcast(ptr: Ptr<QGuiApplication>) -> Ptr<QCoreApplication>

Calls C++ function: QCoreApplication* static_cast<QCoreApplication*>(QGuiApplication* ptr).

Source§

impl StaticUpcast<QObject> for QGuiApplication

Source§

unsafe fn static_upcast(ptr: Ptr<QGuiApplication>) -> Ptr<QObject>

Calls C++ function: QObject* static_cast<QObject*>(QGuiApplication* ptr).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.