Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] QDeclarativeView -> QQuickView

[SOLVED] QDeclarativeView -> QQuickView

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 1.7k 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.
  • O Offline
    O Offline
    overtime
    wrote on last edited by
    #1

    @QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : QQuickView(parent)
    {
    connect(engine(), SIGNAL(quit()), SLOT(close()));
    setResizeMode(QQuickView::SizeRootObjectToView);
    }@

    @
    qmlapplicationviewer.cpp:82: error: no matching function for call to 'QQuickView::QQuickView(QWidget*&)'
    QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : QQuickView(parent)
    ^@

    I am trying to port code to 5.2.
    QDeclarativeView -> QQuickView

    I made that change and now don't know what to do next.

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

      Create a new QtQuick project in QtCreator and copy the code for QmlApplicationViewer from there. If you really need it. Using plain QQuickView is easier, in my opinion.

      (Z(:^

      1 Reply Last reply
      0
      • O Offline
        O Offline
        overtime
        wrote on last edited by
        #3

        I ended up just commenting out the member I was trying to directly initialize.

        @QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) // : QQuickView(parent)
        {
        connect(engine(), SIGNAL(quit()), SLOT(close()));
        setResizeMode(QQuickView::SizeRootObjectToView);
        }@

        Hope this doesn't have repercussions in the long run.

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

          In general, QQuickView needs a QWindow, and not a QWidget (unless you use a QWindowContainer).

          (Z(:^

          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