Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Is it possible to build Qt 5 without qml?
QtWS25 Last Chance

Is it possible to build Qt 5 without qml?

Scheduled Pinned Locked Moved Installation and Deployment
intel 2015qt5qmlconfigure
8 Posts 3 Posters 12.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.
  • R Offline
    R Offline
    RichRowan
    wrote on last edited by RichRowan
    #1

    Is it possible to build Qt 5 without building the qml libraries too?

    I'm building Qt 5.4.1 on Windows 7 using the Intel 2015 compiler. I came across an error with qv4managed_p.h missing a default constructor. ("no default constructor exists for class "QV4::Managed" - the same as a comment in this post)
    It occurred to me that I'm not using qml and therefore if I could stop building them i could work around the error. But it doesn't appear to be possible. I've looked at the configure script and there's no option like -skip qml or -nomake qml.

    Surely you must be able to disable building qml libraries?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leonardo
      wrote on last edited by
      #2

      Try skipping the qtdeclarative module. But that's weird. I've compiled Qt 5.4.1 several times on Windows and never had an error like this one. You're using an unsupported compiler. Why don't you try Visual Studio?

      https://wiki.qt.io/Building_Qt_5_from_Git#Windows

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RichRowan
        wrote on last edited by
        #3

        Our Visual Studio 2013 build is fine. The Intel compiler is obviously a little more strict.

        I want to build with Intel because we have a bug using the newer style of connections when we compile our application with Intel using Qt dlls built with Visual Studio. So I want to see if Qt dlls built with Intel will resolve the issue.

        I skipped the qtdeclarative module. But then had to skip lots of other modules which were looking for the Qt5QuickWidgets or other libs. In the end I had to use the following configure command:
        "configure -release -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -skip qtconnectivity -skip qtdeclarative -skip qtlocation -skip qtmultimedia -skip qtquick1 -skip qtquickcontrols -skip qtsensors -skip qttools -skip qtwebsockets -skip qtwinextras -skip qtwebchannel -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -nomake examples -nomake tests -opensource -confirm-license -opengl desktop -prefix C:\qt-5.4.1-opensource-Intel2015-win64-release"

        Its a lot of modules to have to skip just to avoid all the QML stuff!

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leonardo
          wrote on last edited by
          #4

          Hi. What's that "newer style of connections"? I'm just curious.

          R 1 Reply Last reply
          0
          • L Leonardo

            Hi. What's that "newer style of connections"? I'm just curious.

            R Offline
            R Offline
            RichRowan
            wrote on last edited by
            #5

            @Leonardo
            We recently upgraded from Qt 4.5.0 so to me the "new style" of connecting signals and slots is this :
            connect(sender, &QAbstractButton::clicked, &MyObject::buttonClicked);
            rather than this:
            connect(sender, SIGNAL(clicked()), this, SLOT(buttonClicked()));

            As I said, when we compile our program with Intel the first version doesn't work, i.e. the connections aren't made because the signal signature doesn't match. (In moc_qabstractbutton.cpp QAbstractButton::qt_static_metacall() the func variable is app.exe!QAbstractButton::clicked whereas the function it compares against is Qt5Widgetsd.dll!QAbstractButton::clicked so they don't match. Not sure why with the Intel build it has app.exe rather than Qt5Widgetsd.dll at the start.)
            The second (older) version works fine because it follows a different code path.

            JKSHJ 1 Reply Last reply
            0
            • R RichRowan

              @Leonardo
              We recently upgraded from Qt 4.5.0 so to me the "new style" of connecting signals and slots is this :
              connect(sender, &QAbstractButton::clicked, &MyObject::buttonClicked);
              rather than this:
              connect(sender, SIGNAL(clicked()), this, SLOT(buttonClicked()));

              As I said, when we compile our program with Intel the first version doesn't work, i.e. the connections aren't made because the signal signature doesn't match. (In moc_qabstractbutton.cpp QAbstractButton::qt_static_metacall() the func variable is app.exe!QAbstractButton::clicked whereas the function it compares against is Qt5Widgetsd.dll!QAbstractButton::clicked so they don't match. Not sure why with the Intel build it has app.exe rather than Qt5Widgetsd.dll at the start.)
              The second (older) version works fine because it follows a different code path.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @RichRowan said:

              (In moc_qabstractbutton.cpp QAbstractButton::qt_static_metacall() the func variable is app.exe!QAbstractButton::clicked whereas the function it compares against is Qt5Widgetsd.dll!QAbstractButton::clicked so they don't match. Not sure why with the Intel build it has app.exe rather than Qt5Widgetsd.dll at the start.)

              qabstractbutton.h is not part of your project, therefore moc_qabstractbutton.cpp should not have been created. Something is wrong here.

              Did you copy Qt headers into your project? If so, remove them.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              R 1 Reply Last reply
              0
              • JKSHJ JKSH

                @RichRowan said:

                (In moc_qabstractbutton.cpp QAbstractButton::qt_static_metacall() the func variable is app.exe!QAbstractButton::clicked whereas the function it compares against is Qt5Widgetsd.dll!QAbstractButton::clicked so they don't match. Not sure why with the Intel build it has app.exe rather than Qt5Widgetsd.dll at the start.)

                qabstractbutton.h is not part of your project, therefore moc_qabstractbutton.cpp should not have been created. Something is wrong here.

                Did you copy Qt headers into your project? If so, remove them.

                R Offline
                R Offline
                RichRowan
                wrote on last edited by
                #7

                @JKSH
                I haven't copied the headers or anything like that.
                I built a debug version of Qt to find out exactly where it was failing in the connect call. That allowed me to step into moc_qabstractbutton.cpp which was in the qt source directory.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  RichRowan
                  wrote on last edited by RichRowan
                  #8

                  Back on topic. I found that when building Qt you can specify to build only the module you need at the nmake stage,

                  e.g. nmake module-qtbase

                  That way it won't try and build all the other modules and qml libs.

                  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