How to build Qt Charts 2.1 on Windows 7?



  • I'm using the open source version of Qt 5.6.0, I'm developing on Windows 7 (64 bit) and working on an Android app.

    I would like to use Qt Charts 2.1.0. As described in the blogpost about Qt Charts here:
    "In Qt 5.6 release, the module binaries will still be available only with the commercial packages. Open source users can build the module from the sources."

    So I have to build Qt Charts 2.1.0 from source. As the above article says, the source code is available from codereview.qt-project.org, which I have downloaded.

    I'm following the getting started article for Qt Charts from here. It tells me to:
    "configure the project with qmake" and that "qmake should be run from the folder where Qt has been installed. For example, if Qt is built with -prefix /opt/MyXCompiledQt, then qmake should be run from /opt/MyXCompiledQt/bin/qmake."

    Now, with Qt 5.6, I only have the Android ARMv7 component installed, none of the others (MinGW, msvc2015, WinRT x86, etc.). In the folder C:\Qt\5.6, there is no bin folder. There is a qmake.exe under C:\Qt\5.6\android_armv7\bin. If I run this, I get the following error:
    Could not read qmake configuration file C:/Qt/5.6/android_armv7/mkspecs/android-g++/qmake.conf. Error processing project file: C:\GITHUB\qtcharts\qtcharts\qtcharts.pro

    I'm a little confused whether I'm using the correct qmake. How do I proceed here? Which qmake do I need to run?


  • Lifetime Qt Champion

    Hi,

    If you want to build that module for Android then that's the right qmake.

    One thing I would do is open the project in Qt Creator and build it from there.

    Note that you should rather get the module from code.qt.io, github is only a mirror.



  • @SGaist Thank you! I didn't know I could build a component from Qt Creator.
    I could proceed with the build of the qtcharts project on another computer (with fresh installs of Java JDK, Android SDK, NDK and Qt).

    Now, in my own project, I'll have to include charts as a module, with QT += charts in the .pro file.
    It currently can not find it yet, it says Unknown module(s) in QT: charts.
    I believe I'll have to install this module into Qt. How can I do that?



  • how to click the label to perform some action....


  • Lifetime Qt Champion

    You can do it from Qt Creator by adding a custom make step in the Build part of the project panel.

    @karti-gesar Please don't highjack other people threads with completely unrelated questions.



  • @SGaist I added a Make build step with install argument, moved it 2 steps up, and it worked! It's curious because it already had a Make install as the 3rd step. But anyway.

    Thanks a lot for your help!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.