[−][src]Struct qt_qml::QQmlNetworkAccessManagerFactory
A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support.
C++ class: QQmlNetworkAccessManagerFactory
.
A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support.
To implement a factory, subclass QQmlNetworkAccessManagerFactory and implement the virtual create() method, then assign it to the relevant QML engine using QQmlEngine::setNetworkAccessManagerFactory().
Note the QML engine may create QNetworkAccessManager instances from multiple threads. Because of this, the implementation of the create() method must be reentrant. In addition, the developer should be careful if the signals of the object to be returned from create() are connected to the slots of an object that may be created in a different thread:
- The QML engine internally handles all requests, and cleans up any QNetworkReply objects it creates. Receiving the QNetworkAccessManager::finished() signal in another thread may not provide the receiver with a valid reply object if it has already been deleted.
- Authentication details provided to QNetworkAccessManager::authenticationRequired() must be provided immediately, so this signal cannot be connected as a Qt::QueuedConnection (or as the default Qt::AutoConnection from another thread).
For more information about signals and threads, see Threads and QObjects and Signals and Slots Across Threads.
Methods
impl QQmlNetworkAccessManagerFactory
[src]
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QQmlNetworkAccessManagerFactory>>
) -> Ref<QQmlNetworkAccessManagerFactory>
[src]
&self,
other: impl CastInto<Ref<QQmlNetworkAccessManagerFactory>>
) -> Ref<QQmlNetworkAccessManagerFactory>
A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support.
Calls C++ function: QQmlNetworkAccessManagerFactory& QQmlNetworkAccessManagerFactory::operator=(const QQmlNetworkAccessManagerFactory& other)
.
A QML engine uses QNetworkAccessManager for all network access. By implementing a factory, it is possible to provide the QML engine with custom QNetworkAccessManager instances with specialized caching, proxy and cookies support.
To implement a factory, subclass QQmlNetworkAccessManagerFactory and implement the virtual create() method, then assign it to the relevant QML engine using QQmlEngine::setNetworkAccessManagerFactory().
Note the QML engine may create QNetworkAccessManager instances from multiple threads. Because of this, the implementation of the create() method must be reentrant. In addition, the developer should be careful if the signals of the object to be returned from create() are connected to the slots of an object that may be created in a different thread:
- The QML engine internally handles all requests, and cleans up any QNetworkReply objects it creates. Receiving the QNetworkAccessManager::finished() signal in another thread may not provide the receiver with a valid reply object if it has already been deleted.
- Authentication details provided to QNetworkAccessManager::authenticationRequired() must be provided immediately, so this signal cannot be connected as a Qt::QueuedConnection (or as the default Qt::AutoConnection from another thread).
For more information about signals and threads, see Threads and QObjects and Signals and Slots Across Threads.
Trait Implementations
impl CppDeletable for QQmlNetworkAccessManagerFactory
[src]
Auto Trait Implementations
impl RefUnwindSafe for QQmlNetworkAccessManagerFactory
impl Send for QQmlNetworkAccessManagerFactory
impl Sync for QQmlNetworkAccessManagerFactory
impl Unpin for QQmlNetworkAccessManagerFactory
impl UnwindSafe for QQmlNetworkAccessManagerFactory
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,