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. Qt 5 and qtdesktopcomponents
QtWS25 Last Chance

Qt 5 and qtdesktopcomponents

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 4 Posters 7.5k Views
  • 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.
  • Q Offline
    Q Offline
    qVLAD
    wrote on last edited by
    #1

    Please give me some info about this project.
    I have qt 5.0 release.
    I download, build and install qtdesktopcomponents.
    How i may use this components?
    I try create tools/qmlwidget but he don't have qwindowwidget.h i found this file in repo history and compile with him. Now when i try start application with some example qml as Gallery.qml i see error "Network error".

    If i try use qtdesktopcomponents with

    @QApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("Gallery.qml")); viewer.showExpanded();
    return app.exec();@

    I see this log:

    QMetaObject::indexOfSignal: signal enabledChanged() from QtMenuBase redefined in QtMenuItem
    QQuickView only supports loading of root objects that derive from QQuickItem.
    If your example is using QML 2, (such as qmlscene) and the .qml file you
    loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur.
    To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the
    QQuickView class in the qtquick1 module.
    Remove me: fixing toplevel window flags
    Unable to find a renderable master window QQuickView(0x28fd50) when trying to render QQuickView(0x28fd50) ( QRect(4,23 104x0) ).

    1 Reply Last reply
    0
    • I Offline
      I Offline
      ivoryz
      wrote on last edited by
      #2

      I have the same problem ("QQuickView only supports loading of root objects that derive from QQuickItem. ") with .qml's that contain the new ApplicationWindow (introduced in QtDesktop 1.0) as a root item.

      I am contacting the maintainer right now, so lets see...

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        -I think desktop components are not yet ported to QML2.- I stand corrected, thank you Jens :)

        (Z(:^

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

          They are working fine with QtQuick 2.0. But you cannot use a Window or an ApplicationWindow in a QtQuickView so if you want to use Gallery.qml, you have to change the root item to be a Rectangle first.

          The reason for the error message is that Window is not a QQuickItem itself. The QQuickView is a window that is owned by C++ and cannot be controlled by QML. You can alternatively use a QQmlEngine and pass it Gallery.qml to avoid this conflict. This is what qmlscene does when the root item is a Window.

          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