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] Installing QtQuick Controls
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Installing QtQuick Controls

Scheduled Pinned Locked Moved QML and Qt Quick
21 Posts 5 Posters 33.2k 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.
  • J Offline
    J Offline
    Jens
    wrote on last edited by
    #5

    Are you sure your build was entirely clean? Note that "dev" is no longer the correct branch in qt5, we are using stable now and it sounds like you might have a build that is not entirely up to scratch.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Babalas
      wrote on last edited by
      #6

      Ok so I did a clean build of qt5 stable branch. Stable branch of qtquickcontrols compiles fine (though installs to QtDesktop), dev branch of qtquickcontrols produces this
      @qtmenu.cpp: In member function ‘void QtMenu::setMinimumWidth(int)’:
      qtmenu.cpp:247:25: error: ‘class QPlatformMenu’ has no member named ‘setMinimumWidth’
      qtmenu.cpp: In member function ‘void QtMenu::setFont(const QFont&)’:
      qtmenu.cpp:253:25: error: ‘class QPlatformMenu’ has no member named ‘setFont’
      qtmenu.cpp: In member function ‘void QtMenu::__popup(qreal, qreal, int)’:
      qtmenu.cpp:313:25: error: ‘class QPlatformMenu’ has no member named ‘showPopup’@

      This looks like it needs "Qt 5.1":http://qt-project.org/forums/viewthread/24722 which is the dev branch (unless I'm confused)

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

        No you are not confused. And I am afraid I got bitten by the very same issue as you. The timing of your question was perhaps a bit unfortunate. We did plan to merge all the development branches over to "stable" yesterday but the qtdeclarative repository got stuck in CI and the integration is still pending.

        You can track it's progress here: https://codereview.qt-project.org/#change,51499

        Unless that successfully integrates over night, you will have to fetch that merge directly from gerrit. I would expect a bit of a rough ride for the next couple of days so perhaps you should temporarily stay on "dev" for testing controls. Sorry :)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Babalas
          wrote on last edited by
          #8

          Haha curse being over eager. Ok I'll hold off for a bit

          1 Reply Last reply
          0
          • W Offline
            W Offline
            weiyuemin
            wrote on last edited by
            #9

            Where is the qtquickcontrols repository?
            I cloned the stable branch and dev branch but didn't find a qtquickcontrols folder. I built them and there's no dll related to qtquickcontrols been built.
            Am I missing some steps?
            Or maybe I need some days to wait the merge to be completed and then clone a clean stable branch?

            1 Reply Last reply
            0
            • W Offline
              W Offline
              weiyuemin
              wrote on last edited by
              #10

              Well, I found qtquickcontrols in http://qt.gitorious.org/qt/qtquickcontrols

              But I don't know how to build the module separately. I run qmake and jom (qtbase\bin is added to PATH). It results in error:

              C1083: Cannot open include file: 'QQuickTextDocument': No such file or directory

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

                That error happens because the controls are developed for Qt 5.1 and you are most likely using Qt 5.0. To use the controls you would have to check out Qt 5 from git and compile the stable branch.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  weiyuemin
                  wrote on last edited by
                  #12

                  I think I'm using the dev branch (checked out serveral days ago)

                  BTW, how to compile the specific branch? I'm not sure whether I'm operating correct.

                  What I do is:

                  1). git clone git://gitorious.org/qt/qt5.git qt5

                  I guess the default branch is the stable branch. If I want a dev branch, then Switch to dev branch.

                  2). perl init-repository

                  3). and so on

                  Is this correct?

                  1 Reply Last reply
                  0
                  • W Offline
                    W Offline
                    weiyuemin
                    wrote on last edited by
                    #13

                    I will checked out another clean stable branch, and clone a http://qt.gitorious.org/qt/qtquickcontrols into qt5 folder. Am I operating right?

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

                      Yes it sounds correct. We only merged "dev" into "stable" a few days ago so if you cloned earlier you will probably just have to update and do a clean build. You will need to build qtbase, qtjsbackend and qtdeclarative in order to use qtquickcontrols.

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        weiyuemin
                        wrote on last edited by
                        #15

                        Thank you.
                        So I will do the following:
                        1). clone the stable branch now, into D:\Qt\git\qt5
                        2). cd into D:\Qt\git\qt5, perl init-repository
                        3). clone http://qt.gitorious.org/qt/qtquickcontrols, into D:\Qt\git\qt5\qtquickcontrols
                        4). configure -debug-and-release -opensource -opengl desktop -nomake tests -no-vcproj
                        5). jom\jom -j2

                        Am I right?

                        My question is, as long as I put qtquickcontrols into the qt5 folder, the configure script will know the 'qtquickcontrols' is there, and do the right thing? Shall I need some more arguments or options when configure ?

                        Becausing cloning and building takes a long time and I've failed many times, So I'd like to ask the operations in detail. Thank you for your patience :)

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

                          The qtquickcontrols is still an independent project from qt5 and doesn't have to be in the same folder. Configure shouldn't have to do anything special to build it. It can be treated as any other qml project, but it might need write access to your qt directory for a proper installation.

                          After compiling qt5 in stable, all you really have to do to make controls work is "qmake", "make" and possibly "make install". They should deploy themselves into your qt5/qtbin/qml folder so that any qml code that imports QtQuick.Controls will find them in their search path.

                          1 Reply Last reply
                          0
                          • W Offline
                            W Offline
                            weiyuemin
                            wrote on last edited by
                            #17

                            Well, I got it :) I used to think it's a plugin or a part of Qt so it should be in the Qt folder. Haha
                            Thank you :)

                            1 Reply Last reply
                            0
                            • W Offline
                              W Offline
                              weiyuemin
                              wrote on last edited by
                              #18

                              Still failed..

                              I don't have a 'make', so I use nmake (or jom) after qmake. Is this OK?

                              This error:

                              d:\qt\stable\qtquickcontrols\examples\text.moc../src/documenthandler.h(44) : fatal error C1083: Cannot open include file: 'QQuickTextDocument': No such file or directory

                              I tried three versions of Qt: dev(checked out today, serveral hours ago) / stable(serveral days ago) / dev(serveral days ago)

                              then cd into qtquickcontrols, qmake, nmake ( or jom ), all result in the same error: 'QQuickTextDocument': No such file or directory

                              In fact, I searched my Qt folders, there are indeed no file named 'QQuickTextDocument'.

                              I switch the dev branch to stable branch, git pull, git submodule sync, git submodule update --recursive, search the folder, still no file named 'QQuickTextDocument'.

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                jiggy
                                wrote on last edited by
                                #19

                                Is there any update on this? I am still getting same error.
                                "module "QtQuick.Controls" plugin "plugin" not found "

                                I have downloaded qt5 and installed "stable" branch today. but I can't see qtquickcontrols in qt5 directory. So I downloaded qtquickcontrols from git, compiled and installed.

                                QtCreator imports other modules for example "LocalStorage 2.0" from QtQuick but not Controls.
                                I rechecked and Controls folder is there in Qt_install_dir/qml/QtQuick.

                                ps: when I type "import QtQuickControls 1.0" QtCreator doesn't show red underline. does that mean creator found it?

                                1 Reply Last reply
                                0
                                • W Offline
                                  W Offline
                                  weiyuemin
                                  wrote on last edited by
                                  #20

                                  jiggy: you can try Qt 5.1 alpha: http://qt-project.org/wiki/Qt-5.1-Alpha

                                  There is qtquickcontrols in 5.1's directory.

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    jiggy
                                    wrote on last edited by
                                    #21

                                    weiyuemin:

                                    That worked. thanks!

                                    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