Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Problem with ApplicationWindow on QT Quick 2 Application
Forum Updated to NodeBB v4.3 + New Features

Problem with ApplicationWindow on QT Quick 2 Application

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GGILOYAN
    wrote on last edited by
    #1

    Hi everyone.
    I have problem trying to use ApplicationWindow.
    @import QtQuick 2.1
    import QtQuick.Controls 1.0
    import QtQuick.Window 2.0

    ApplicationWindow {
    title: qsTr("Hello World")
    width: 640
    height: 480

    menuBar: MenuBar {
        Menu {
            title: qsTr("File")
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }
    
    Button {
        text: qsTr("Hello World")
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
    }
    

    }@

    When i use Rectlange instead of ApplicationWindow then everythig is ok, but i need a ApplicationWindow for can adds convenience for positioning items.

    Thanks.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      That is just the example code of application window. You need to specify exactly what your problem is. Remember that ApplicationWindow is not supported by QQuickView.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GGILOYAN
        wrote on last edited by
        #3

        Thanks.

        What type of application i have to create to use ApplicationWindow and QtQuick.Controls 1.0 and can create C++ class or what class supported ApplicationWindow and QtQuick.Controls 1.0

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jens
          wrote on last edited by
          #4

          It is listed on the overview page here:
          http://doc-snapshot.qt-project.org/qt5-stable/qtquickcontrols/qtquickcontrols-overview.html

          You have to use QmlApplicationEngine as the example shows

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GGILOYAN
            wrote on last edited by
            #5

            Thank you very much.
            Now it's work.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved