<div dir="ltr">Hello.<div><br></div><div style>I created dialog:</div><div style><br></div><div style><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>QtQuick<span style="color:rgb(192,192,192)"> </span>2.0</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>Ubuntu.Components<span style="color:rgb(192,192,192)"> </span>0.1</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>Ubuntu.Components.Popups<span style="color:rgb(192,192,192)"> </span>0.1</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">Item</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">signal</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">confirmed</span>;</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">signal</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">canceled</span>;</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    property alias title: dialog.title</span></pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    property alias text: dialog.text</span></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br>
</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">signal</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">show</span>(variant<span style="color:rgb(192,192,192)"> </span>caller);</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">Component</span><span style="color:rgb(192,192,192)"> </span>{</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">dialogComponent</span></pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="font-style:italic"><br></span></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span><span style="color:rgb(128,0,128)">Dialog</span><span style="color:rgb(192,192,192)"> </span>{</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">dialog</span></pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span><span style="color:rgb(128,0,0)">title</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Exit</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Game"</span></pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span><span style="color:rgb(128,0,0)">text</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Are</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">you</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">sure</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">that</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">you</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">want</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">exit?"</span></pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span><span style="color:rgb(128,0,128)">Button</span><span style="color:rgb(192,192,192)"> </span>{</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span><span style="color:rgb(128,0,0)">text</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"cancel"</span></pre>


<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span><span style="color:rgb(128,0,0)">onClicked</span>:</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)">                 </span>{</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                     </span><span style="font-style:italic">canceled</span>();</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)">                     </span>PopupUtils.close(<span style="font-style:italic">dialog</span>);</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span>}</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span>}</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span><span style="color:rgb(128,0,128)">Button</span><span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span><span style="color:rgb(128,0,0)">text</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"confirm"</span></pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span><span style="color:rgb(128,0,0)">color</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"orange"</span></pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span><span style="color:rgb(128,0,0)">onClicked</span>:</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)">                 </span>{</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                     </span><span style="font-style:italic">confirmed</span>();</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)">                     </span>PopupUtils.close(<span style="font-style:italic">dialog</span>);</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                 </span>}</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">             </span>}</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span>}</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">onShow</span>:</pre>
<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>PopupUtils.open(<span style="font-style:italic">dialogComponent</span>,<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(41,133,199)">caller</span>)</pre>

<pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">}</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">But I has problem:</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<span style="color:rgb(190,20,20);font-size:12px">qrc:/ConfirmationDialog.qml:8:</span><span style="color:rgb(190,20,20);font-size:12px">23: Invalid alias reference. Unable to find id "dialog"</span><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
<br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">So, how to create this aliases?</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">
Best regards,</pre><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px">Nick</pre></pre></div></div>