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. [SOLVED] Compile Error: QtQuick1/QDeclarativeView: No such file or directory
QtWS25 Last Chance

[SOLVED] Compile Error: QtQuick1/QDeclarativeView: No such file or directory

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 7.1k 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.
  • M Offline
    M Offline
    mbreier
    wrote on last edited by
    #1

    Hello,

    I installed Qt 5.0.0 on my Kubuntu 12.04.1 and all works fine. Projects can be compiled and all include and libs are found. I use QtCreator.
    Because I use widgets and QML together, I use QDeclarativeView to show the QML UIs. When I make a clean project, just with 1 main window and I place a QDeclarativeView on the main window (nothing more) I get the compiler error as described in the headline.
    The error is in the ui_mainwindow.h file which is a Qt - generated file.
    To solve it, I have to delete the "QtQuick1/" from the include statement, then it can be compiled. Problem is, every time i make a "rebuild all" the incorrect statement is back again.

    Any help or workaround for this?

    Regrads
    Michael

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xhsiung
      wrote on last edited by
      #2

      me too .

      1 Reply Last reply
      0
      • W Offline
        W Offline
        w00t
        wrote on last edited by
        #3

        does your .pro have QT += declarative?

        --
        http://rburchell.com

        1 Reply Last reply
        0
        • H Offline
          H Offline
          HIskind
          wrote on last edited by
          #4

          To use QtQuick1 ( according to "this":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-porting-qt5.htmlhttp:// ) you should add to .pro line:
          QT += quick1

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbreier
            wrote on last edited by
            #5

            The .pro file of cause contains QT += declarative.

            I tried the link of HIskind but it is broken. But I found what he wants to show. Here the correct link: "http://qt-project.org/doc/qt-5.0/qtquick/qtquick-porting-qt5.html":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-porting-qt5.html

            The page gives some good explanations when porting to Qt5, I think I will use it as a starting point.

            I tried to add the line QT += quick1 but this gave me the qmake error message:
            Unknown module(s) in QT: quick1

            I think there is a bug in the QtQuick1 support in the final Qt5 release.

            Here my .Pro file for completeness:

            @#-------------------------------------------------

            Project created by QtCreator 2012-12-27T17:21:22

            #-------------------------------------------------

            QT += core gui declarative

            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

            TARGET = test1
            TEMPLATE = app

            SOURCES += main.cpp
            mainwindow.cpp

            HEADERS += mainwindow.h

            FORMS += mainwindow.ui@

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbreier
              wrote on last edited by
              #6

              Update:
              My environment is Windows7(64Bit) for Linux or Mac you have to change the following steps accordingly.

              If you intend to use QDeclarativeView with Qt5 you can use the following workaround:

              make a new folder qtbase\include\qtquick1

              copy the complete content of the folder qtbase\include\QtDeclarative into qtbase\include\qtquick1.

              Then you can compile all your old projects which are using QDeclarativeView.

              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