title: How to open a second ApplicationWindow on android qml
body: <p>I have two application windows and I want to open a second one like so in the attached code.</p>
  
  <p>I have a couple of questions:
  1. by opening a second window would this create the equivalent to an android "Activity"?</p>
  
  <ol start="2">
  <li><p>if i pressed the back button would it return to the previous application window? Like an android activity?</p></li>
  <li><p>if 2 is false then which is the best practice for this?</p></li>
  </ol>
  
  <p>main.qml</p>
  
  <pre><code>import QtQuick 2.4
  import QtQuick.Controls 1.3
  import QtQuick.Window 2.2
  import QtQuick.Dialogs 1.2
  
  ApplicationWindow {
      id:window
      title: qsTr("Hello World")
      width: 640
      height: 480
      visible: true
  
  
      Rectangle{
          anchors.fill:parent
          color:"blue"
      }
  
      Rectangle{
          width:parent.width/6
          height:width/3
          anchors.centerIn:parent
  
          MouseArea{
              anchors.fill:parent
              onClicked:{
                  var component = Qt.createComponent("Two.qml");
                  if (component.status == Component.Ready)
                       component.createObject(window, {});
              }
  
          }
  
      }
  }
  </code></pre>
  
  <p>Two.qml</p>
  
  <pre><code>import QtQuick 2.4
  import QtQuick.Controls 1.3
  import QtQuick.Window 2.2
  import QtQuick.Dialogs 1.2
  
  ApplicationWindow {
      id:window
      title: qsTr("Hello World")
      width: 640
      height: 480
      visible: true
  
      Rectangle{
          anchors.fill:parent
          color:"red"
      }
  }
  </code></pre>
  
  <p>When I click on the rectangle to open the second window i get the following error: </p>
  
  <pre><code>W/Adreno-EGL(25103): &lt;qeglDrvAPI_eglSwapBuffers:3556&gt;: EGL_BAD_CONTEXT
  W/Qt      (25103): (null):0 ((null)): QEGLPlatformContext::swapBuffers(): eglError: 12294, this: 0x6234de38 
  </code></pre>