<areahref="class_qt_mvvm_1_1_data_sync_view_model.html"title="A viewmodel to show a overview of the datasync status and account. "alt="QtMvvm::DataSyncViewModel"shape="rect"coords="0,112,230,136"/>
<areahref="class_qt_mvvm_1_1_network_exchange_view_model.html"title="A viewmodel to show a dialog to exchange account data via the QtDataSync::UserExchangeManager. "alt="QtMvvm::NetworkExchangeViewModel"shape="rect"coords="240,112,470,136"/>
<areahref="class_qt_mvvm_1_1_settings_view_model.html"title="A ViewModel for a generic settings dialog based of an XML settings file. "alt="QtMvvm::SettingsViewModel"shape="rect"coords="480,112,710,136"/>
<areahref="class_qt_mvvm_1_1_data_sync_settings_view_model.html"title="An extension of the normal settings viewmodel with the DataSyncSettingsAccessor as accessor..."alt="QtMvvm::DataSyncSettingsViewModel"shape="rect"coords="480,168,710,192"/>
<trclass="memdesc:aed696c49a28b9615d3433c6a27006c70"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called by the presenter to initialize the viewmodel. <ahref="#aed696c49a28b9615d3433c6a27006c70">More...</a><br/></td></tr>
<trclass="memdesc:a0da1ac73d99d0ddd7d22937e6c2e476d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called by the presenter when a result of a showed viewmodel is ready. <ahref="#a0da1ac73d99d0ddd7d22937e6c2e476d">More...</a><br/></td></tr>
<trclass="memdesc:ac411a428c622bf6cf9b0b594de23d81f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Should be emitted when the viewmodels result is ready. <ahref="#ac411a428c622bf6cf9b0b594de23d81f">More...</a><br/></td></tr>
<trclass="memdesc:aac43c9f8e10500afb8d72d6c39590d3b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Is emitted on single instance viewmodels when they get shown again. <ahref="#aac43c9f8e10500afb8d72d6c39590d3b">More...</a><br/></td></tr>
<trclass="memdesc:ab9af98395bd1f6d8ee3fbba360002768"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Default constructor with parent. <br/></td></tr>
<trclass="inherit_header pub_methods_class_q_object"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_class_q_object')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="target="_blank"https://doc.qt.io/qt-5/class_q_object.html">QObject</a></td></tr>
int </td><tdclass="memItemRight"valign="bottom"><aclass="elRef"target="_blank"doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/"href="https://doc.qt.io/qt-5/qobject.html#startTimer-1">startTimer</a> (std::chrono::milliseconds time, Qt::TimerType timerType)</td></tr>
<trclass="memdesc:aa69782ceb2b1657f004fdfc22ea4efaa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one. <ahref="#aa69782ceb2b1657f004fdfc22ea4efaa">More...</a><br/></td></tr>
<trclass="memdesc:a238c2cb9fed0e4131a7ca73033728d11"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one. <ahref="#a238c2cb9fed0e4131a7ca73033728d11">More...</a><br/></td></tr>
<trclass="memdesc:a14ff0d5358f52b5a3383f1f8d3e81202"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one. <ahref="#a14ff0d5358f52b5a3383f1f8d3e81202">More...</a><br/></td></tr>
<trclass="memdesc:a7a5b532fd4dfb25a01dcf8a10311ac1a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one and expect its result. <ahref="#a7a5b532fd4dfb25a01dcf8a10311ac1a">More...</a><br/></td></tr>
<trclass="memdesc:a0bc3140cbd2c2dc6b40b5ca00c297a2c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one and expect its result. <ahref="#a0bc3140cbd2c2dc6b40b5ca00c297a2c">More...</a><br/></td></tr>
<trclass="memdesc:a08d21a1940935bc703bcfb50dc6656e4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Show another viewmodel as a child of this one and expect its result. <ahref="#a08d21a1940935bc703bcfb50dc6656e4">More...</a><br/></td></tr>
<trclass="inherit_header pro_methods_class_q_object"><tdcolspan="2"onclick="javascript:toggleInherit('pro_methods_class_q_object')"><imgsrc="closed.png"alt="-"/> Protected Member Functions inherited from <aclass="el"href="target="_blank"https://doc.qt.io/qt-5/class_q_object.html">QObject</a></td></tr>
<trclass="inherit_header pub_static_methods_class_q_object"><tdcolspan="2"onclick="javascript:toggleInherit('pub_static_methods_class_q_object')"><imgsrc="closed.png"alt="-"/> Static Public Member Functions inherited from <aclass="el"href="target="_blank"https://doc.qt.io/qt-5/class_q_object.html">QObject</a></td></tr>
<trclass="inherit_header properties_class_q_object"><tdcolspan="2"onclick="javascript:toggleInherit('properties_class_q_object')"><imgsrc="closed.png"alt="-"/> Properties inherited from <aclass="el"href="target="_blank"https://doc.qt.io/qt-5/class_q_object.html">QObject</a></td></tr>
<divclass="textblock"><p>The base class for all viewmodels. </p>
<p>The <aclass="el"href="class_qt_mvvm_1_1_view_model.html"title="The base class for all viewmodels. ">ViewModel</a> is the primary class of the core library is must be implemented to create custom viewmodels to be shown via the mvvm mechanism. To create a custom viewmodel, simply implement this class and show the viewmodel via one of the show methods. Viewmodels presented that way support automatic injection via injectable properties.</p>
<dlclass="section attention"><dt>Attention</dt><dd>In order for a viewmodel be showble, it must implement an invokable constructor with a single QObject* parameter for the parent. It basically should look like this: <divclass="fragment"><divclass="line">Q_INVOKABLE <spanclass="keyword">explicit</span> MyViewModel(<aclass="codeRef"target="_blank"doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtautoupdater/qtautoupdater.tags:https://doc.qt.io/qt-5/"href="https://doc.qt.io/qt-5/class_q_object.html">QObject</a> *<aclass="codeRef"target="_blank"doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/"href="https://doc.qt.io/qt-5/qobject.html#parent">parent</a> = <spanclass="keyword">nullptr</span>);</div></div><!-- fragment --></dd></dl>
<p>Normally, showing a viewmodel will always create a new instance of it, and thus show a new gui. However, by adding the <aclass="el"href="viewmodel_8h.html#a68bd7756c5859a745f1b0de6bb57c9a0"title="A macro that makes a viewmodel a singleton viewmodel. ">QTMVVM_SINGLETON</a> macro to the class definition, your viewmodel becomes a single instance. This means, it will only be created once, and subsequent show requests will instead only trigger the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aac43c9f8e10500afb8d72d6c39590d3b"title="Is emitted on single instance viewmodels when they get shown again. ">instanceInvoked()</a> signal on the existing instance.</p>
<p>If the existing instance gets destroyed at some point, show requests will show a new instance.</p>
<p>Some viewmodel require a special viewmodel as their parent to be show in. To simplify the handling of those viewmodel, you can specify a parent container for a viewmodel via the <aclass="el"href="viewmodel_8h.html#a5876e53517263b77a22bb849b3976d61"title="A macro to specify the container viewmodel to be used. ">QTMVVM_CONTAINER_VM</a> macro. If added, everytime you try to show a viewmodel of this kind, the presenter will first create a new viewmodel of the type specified by the macro, and then show the original viewmodel immediatly after as child of the newly created parent. (The parent and the child can both be singletons)</p>
<p>You can specify parameters to be passed to the parent that is to be created via a special parameter named <code>"qtmvvm_container_params"</code>. The value of that property must be a variant hash as well. In addition, a special parameter is added to the parent parameter, the <code>"qtmvvm_container_for"</code> parameter, which contains the name of the viewmodel that triggered its creation.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a>, <aclass="el"href="injection_8h.html#a0a6e278ad53a06df6f32b1b636ec6151"title="Mark a property for injection. ">QTMVVM_INJECT</a>, <aclass="el"href="viewmodel_8h.html#a68bd7756c5859a745f1b0de6bb57c9a0"title="A macro that makes a viewmodel a singleton viewmodel. ">QTMVVM_SINGLETON</a>, <aclass="el"href="viewmodel_8h.html#a5876e53517263b77a22bb849b3976d61"title="A macro to specify the container viewmodel to be used. ">QTMVVM_CONTAINER_VM</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="viewmodel_8h_source.html#l00021">21</a> of file <aclass="el"href="viewmodel_8h_source.html">viewmodel.h</a>.</p>
<p>Is emitted on single instance viewmodels when they get shown again. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">params</td><td>The show parameters that were passed to the show method</td></tr>
</table>
</dd>
</dl>
<p>If this viewmodel is a single instance viewmodel (<aclass="el"href="viewmodel_8h.html#a68bd7756c5859a745f1b0de6bb57c9a0"title="A macro that makes a viewmodel a singleton viewmodel. ">QTMVVM_SINGLETON</a>), then only the first show will actually create a viewmodel. All subsequent shows for that type will instead trigger this signal on the existing instance.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="viewmodel_8h.html#a68bd7756c5859a745f1b0de6bb57c9a0"title="A macro that makes a viewmodel a singleton viewmodel. ">QTMVVM_SINGLETON</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#qtmvvm_viewmodel_singleton">"Singleton Viewmodels"</a></dd></dl>
<p>Called by the presenter to initialize the viewmodel. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">params</td><td>The parameters to initialize the viewmodel with</td></tr>
</table>
</dd>
</dl>
<p>This method is called by the presenter right after creating the view and reparenting the viewmodel to the view. The parameters are the ones that have been passed to the show method called to show this viewmodel instance. Reimplement this method if you need to perform initializations after beeing assigned to a viewmodel or if you want to support a parametrized viewmodel.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#aa69782ceb2b1657f004fdfc22ea4efaa"title="Show another viewmodel as a child of this one. ">ViewModel::show</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<p>Reimplemented in <aclass="el"href="class_qt_mvvm_1_1_data_sync_view_model.html#a820d813143b769c98daa8abc3d13c408">QtMvvm::DataSyncViewModel</a>, <aclass="el"href="class_qt_mvvm_1_1_settings_view_model.html#a320e7141b1ca4a5fd42becd577d4683b">QtMvvm::SettingsViewModel</a>, <aclass="el"href="class_qt_mvvm_1_1_network_exchange_view_model.html#a48a8a8facd1b2a257e124147a1291233">QtMvvm::NetworkExchangeViewModel</a>, and <aclass="el"href="class_qt_mvvm_1_1_data_sync_settings_view_model.html#a35be63e99cd03b98c92699692ea4d829">QtMvvm::DataSyncSettingsViewModel</a>.</p>
<p>When showing a child viewmodel via <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">showForResult()</a>, then the result of that show request is reported back via this function. The requestCode is the one that was passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">showForResult()</a> method, and the result what the viewmodel reported back. If the showed viewmodel emitted <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">resultReady()</a> before beeing destroyed, this value passed to that signal is whats reported as result. If the child viewmodel gets destroyed without ever emitting that signal, this method is still called, but with an invalid <aclass="elRef"target="_blank"doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/"href="https://doc.qt.io/qt-5/qvariant.html">QVariant</a> as result.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">ViewModel::resultReady</a></dd></dl>
<p>Reimplemented in <aclass="el"href="class_qt_mvvm_1_1_data_sync_view_model.html#a00882b4d210f598fdd9e9f96640f0d96">QtMvvm::DataSyncViewModel</a>, and <aclass="el"href="class_qt_mvvm_1_1_network_exchange_view_model.html#a1b3a76fbf9fbc29bc8e444b589914406">QtMvvm::NetworkExchangeViewModel</a>.</p>
<p>Should be emitted when the viewmodels result is ready. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">result</td><td>The result that should be passed to the parent viewmodel</td></tr>
</table>
</dd>
</dl>
<p>Viewmodels that have been created via <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">showForResult()</a> must emit this signal to report back the result of the show request. Doing so will lead to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">onResult()</a> method of the showing viewmodel beeing with the emitted result as second parameter. Not emitting this signal before the viewmodel gets destroy leads to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">onResult()</a> beeing called with an invalid result.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">ViewModel::onResult</a></dd></dl>
<p>Show another viewmodel as a child of this one. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="viewmodel_8h_source.html#l00077">77</a> of file <aclass="el"href="viewmodel_8h_source.html">viewmodel.h</a>.</p>
<p>Show another viewmodel as a child of this one. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">viewModelName</td><td>The name of the viewmodel class to be shown </td></tr>
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<p>Show another viewmodel as a child of this one. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">viewMetaObject</td><td>The metaobject of the viewmodel class to be shown </td></tr>
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#a7a5b532fd4dfb25a01dcf8a10311ac1a"title="Show another viewmodel as a child of this one and expect its result. ">ViewModel::showForResult</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<p>Show another viewmodel as a child of this one and expect its result. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">requestCode</td><td>The code of the show request </td></tr>
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly. The viewmodel is show for a result, meaning that a result is reported back via <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> as soon as the shown viewmodel emits <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">resultReady()</a> or has been destroyed. The request code is passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">onResult()</a> method in order to identify the show request.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#aa69782ceb2b1657f004fdfc22ea4efaa"title="Show another viewmodel as a child of this one. ">ViewModel::show</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">ViewModel::resultReady</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">ViewModel::onResult</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="viewmodel_8h_source.html#l00084">84</a> of file <aclass="el"href="viewmodel_8h_source.html">viewmodel.h</a>.</p>
<p>Show another viewmodel as a child of this one and expect its result. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">viewModelName</td><td>The name of the viewmodel class to be shown </td></tr>
<tr><tdclass="paramname">requestCode</td><td>The code of the show request </td></tr>
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly. The viewmodel is show for a result, meaning that a result is reported back via <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> as soon as the shown viewmodel emits <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">resultReady()</a> or has been destroyed. The request code is passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">onResult()</a> method in order to identify the show request.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#aa69782ceb2b1657f004fdfc22ea4efaa"title="Show another viewmodel as a child of this one. ">ViewModel::show</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">ViewModel::resultReady</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">ViewModel::onResult</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>
<p>Show another viewmodel as a child of this one and expect its result. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">viewMetaObject</td><td>The metaobject of the viewmodel class to be shown </td></tr>
<tr><tdclass="paramname">requestCode</td><td>The code of the show request </td></tr>
<tr><tdclass="paramname">params</td><td>The show parameters to be passed to the created viewmodel</td></tr>
</table>
</dd>
</dl>
<p>This method will send a show request to the core app to show a viewmodel of the given type. The parameters are passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> method by the presenter after creating and parenting the view. The viewmodel will be shown asynchronously, so this method will return immediatly. The viewmodel is show for a result, meaning that a result is reported back via <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">onInit()</a> as soon as the shown viewmodel emits <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">resultReady()</a> or has been destroyed. The request code is passed to the <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">onResult()</a> method in order to identify the show request.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="class_qt_mvvm_1_1_view_model.html#aa69782ceb2b1657f004fdfc22ea4efaa"title="Show another viewmodel as a child of this one. ">ViewModel::show</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#aed696c49a28b9615d3433c6a27006c70"title="Called by the presenter to initialize the viewmodel. ">ViewModel::onInit</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#ac411a428c622bf6cf9b0b594de23d81f"title="Should be emitted when the viewmodels result is ready. ">ViewModel::resultReady</a>, <aclass="el"href="class_qt_mvvm_1_1_view_model.html#a0da1ac73d99d0ddd7d22937e6c2e476d"title="Called by the presenter when a result of a showed viewmodel is ready. ">ViewModel::onResult</a>, <aclass="el"href="class_qt_mvvm_1_1_core_app.html#a217da24a389f941bac316016928d30df"title="Show a new ViewModel by its type. ">CoreApp::show</a></dd></dl>