Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] KDChart crash on constructor.
Forum Updated to NodeBB v4.3 + New Features

[Solved] KDChart crash on constructor.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 673 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.
  • V Offline
    V Offline
    VRonin
    wrote on 26 Oct 2013, 12:57 last edited by
    #1

    Hi guys,
    I just came across KDChart and I'm trying it's functionality.
    I built the library (for windows) following the instructions and compiled an example, a very easy one:
    @
    #include <QApplication>
    #include <KDChartWidget>

    int main( int argc, char** argv ) {
    QApplication app( argc, argv );

    KDChart::Widget widget; //Crash here
    widget.resize( 600, 600 );
    
    QVector< qreal > vec0,  vec1,  vec2;
    
    vec0 << -5 << -4 << -3 << -2 << -1 << 0
         << 1 << 2 << 3 << 4 << 5;
    vec1 << 25 << 16 << 9 << 4 << 1 << 0
         << 1 << 4 << 9 << 16 << 25;
    vec2 << -125 << -64 << -27 << -8 << -1 << 0
         << 1 << 8 << 27 << 64 << 125;
    
    widget.setDataset( 0, vec0, "Linear" );
    widget.setDataset( 1, vec1, "Quadratic" );
    widget.setDataset( 2, vec2, "Cubic" );
    
    widget.show();
    
    return app.exec(&#41;;
    

    }
    @

    Apparently it crashes, at runtime, when I try to instantiate the widget causing the main to return 1.
    Any Idea what I did wrong?
    Using Qt 4.8 on VS2010 and Windows 7

    Edit:
    Ok, I'm just dumb, I forgot I compiled KD Chart for release and tried compiling the example as debug. That it's what caused the crash.
    Leaving it here if somebody else is silly enough to run into my same problem

    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
    ~Napoleon Bonaparte

    On a crusade to banish setIndexWidget() from the holy land of Qt

    1 Reply Last reply
    0

    1/1

    26 Oct 2013, 12:57

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved