Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39477

Enable QWidget based classes to be used in QML files

    XMLWordPrintable

Details

    • 82fbaa78f3840bcc289adc4e1ec64e337346f148

    Description

      Currently, QWidget based class cannot be a container for other QWidget object in QML because of Q_ASSERT(!d->isWidget); in object.cpp:1921

      To remove this assert or find some better solution, because QWidget base QML component library can be created then and declarative stuff can be exposed to QWidget world.

      Maybe there are some circumstances I'm not aware of, but I was playing bit around and this concept seems to work. I have simple application with QWidget derived classes, qml and screen-shot is attached.

      Attachments

        1. 1.png
          1.png
          9 kB
        2. main.qml
          0.7 kB
        3. qt39477.tar.gz
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            fvacek Fanda Vacek
            Votes:
            6 Vote for this issue
            Watchers:
            16 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes