Create line chart with Visual Studio 2015 and Qt 5.9



  • Hello,
    I am trying to create a line chart in Visual Studio 2015 by using Qt 5.9.

    I already set up the .pro file, but still get a problem with QtLib.

    In main.cpp
    0_1508201805965_chart1.PNG
    In .pro file
    0_1508201837112_chart2.PNG

    And the error
    0_1508201852356_chart3.PNG

    I appreciate any help from all of you

    Thank you



  • does using the macro instead help:

    QT_CHARTS_USE_NAMESPACE
    
    int main(int argc, char *argv[])
    

    Do the example chart projects work for you? If they do that will be a simple test of finding differences of broken vs working...



  • Where I do use Charts obejcts, I also use a namespace on that class (as you are main):

    using namespace QtCharts;
    class ...
    

    Again, comparing the example apps to mine worked a treat for me.


  • Moderators

    @Kanguru Can you post the compiler/linker output? It looks like your app is not linked against QtChart lib.


Log in to reply
 

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