Results 1 to 6 of 6

Thread: Use QtQuick 1 in Qt5

  1. #1

    Default Use QtQuick 1 in Qt5

    Hi
    I have a qml file which imports QtQuick 1.0. It was ok in Qt 4.8 but after porting to qt5.7 it does not work.
    Remember that I don't want to use QtQuick 2. Is there any solution for my problem?
    my code is:
    QQuickView *view = new QQuickView;
    view->setSource(QUrl::fromLocalFile("D:/test/myQml.qml"));
    view->show();

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Use QtQuick 1 in Qt5

    If you don't want to use QtQuick 2 then you can't use QQuickView.

    QtQuick 1 needs the widget based QDeclarativeView

    Cheers,
    _

  3. #3

    Default Re: Use QtQuick 1 in Qt5

    But how can I use QDeclarative in Qt5?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Use QtQuick 1 in Qt5

    Qt 5.5 did still contain Qt Declarative and it is still manually buildable for subsequent Qt versions.

    Cheers,
    _

  5. #5

    Default Re: Use QtQuick 1 in Qt5

    Quote Originally Posted by anda_skoa View Post
    Qt 5.5 did still contain Qt Declarative and it is still manually buildable for subsequent Qt versions.

    Cheers,
    _
    Hi,
    I use Qt with visual studio 2015 so I must use Qt5.7. I got qtquick1 code from code.qt.io but it has some compile errors. Do you have any idea to solve this problem?
    Some of these errors are:

    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(360) : error C2027: use of undefined type 'QDeclarativeAnchorLine'
    1> c:\qtquick1-dev\src\declarative.moc\release../../graphicsitems/qdeclarativeanchors_p.h(50): note: see declaration of 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(360) : error C2582: 'operator =' function is unavailable in 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(361) : error C2027: use of undefined type 'QDeclarativeAnchorLine'
    1> c:\qtquick1-dev\src\declarative.moc\release../../graphicsitems/qdeclarativeanchors_p.h(50): note: see declaration of 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(361) : error C2582: 'operator =' function is unavailable in 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(362) : error C2027: use of undefined type 'QDeclarativeAnchorLine'
    1> c:\qtquick1-dev\src\declarative.moc\release../../graphicsitems/qdeclarativeanchors_p.h(50): note: see declaration of 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(362) : error C2582: 'operator =' function is unavailable in 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(363) : error C2027: use of undefined type 'QDeclarativeAnchorLine'
    1> c:\qtquick1-dev\src\declarative.moc\release../../graphicsitems/qdeclarativeanchors_p.h(50): note: see declaration of 'QDeclarativeAnchorLine'
    1>.moc\Release\moc_qdeclarativeanchors_p.cpp(363) : error C2582: 'operator =' function is unavailable in 'QDeclarativeAnchorLine'

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Use QtQuick 1 in Qt5

    Maybe try building Qt as a whole, including the qtquick1 module.

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 27th February 2016, 04:34
  2. Replies: 3
    Last Post: 6th March 2014, 11:09
  3. Import QtQuick 2.0 or 2.1 or 2.2?
    By pherthyl in forum Qt Quick
    Replies: 2
    Last Post: 9th January 2014, 21:13
  4. QtQuick 2.1
    By shadowroot in forum Qt Quick
    Replies: 1
    Last Post: 6th April 2013, 09:44
  5. What is QtQuick/QML really for?
    By Huk in forum Qt Quick
    Replies: 7
    Last Post: 21st June 2012, 21:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.