Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qwtplot3d with Qt 5, Qt Creator and MinGW?
Forum Updated to NodeBB v4.3 + New Features

Qwtplot3d with Qt 5, Qt Creator and MinGW?

Scheduled Pinned Locked Moved 3rd Party Software
1 Posts 1 Posters 3.0k 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.
  • T Offline
    T Offline
    Thegreger
    wrote on last edited by
    #1

    I'm beginning to learn Qt, and about four months into my project I need to incorporate 3-dimensional plotting into it. From what I've heard, Qwtplot3d should be a suitable tool to use. The concept of linking to libraries in my project is new ground for me, though.

    Compiling Qwtplot3d in Qt Creator was relatively smooth. I've ended up with the files libqwtplot3d.lib, libqwtplot3dd.lib, qwtplot3d.dll and qwtplot3dd.dll (located in a subdirectory to the debug build folder). Using the library, however, is more problematic.

    As a test, I've created a project with a pushbutton, and connected the click event of this button to the code

    @1.SurfacePlot *plot3 = new SurfacePlot(this);@

    When clicking the button, my program crashes with the error message "QWidget: Must construct a QApplication before a QPaintDevice", even though I've already did construct my QApplication back in main.cpp. It's quite similar to the error in this thread, but as far as I can tell I'm building both the libraries and my test project in debug mode: http://qt-project.org/forums/viewthread/12838

    My first thought was that it was a user error, so I proceeded to test the example projects that are distributed with Qwtplot3d. I did get them to build after a few minor modifications, but they all crash immediately with the text "The program has unexpectedly finished."

    I'm using Qt Creator with Qt 5 on Windows, with the mingw compiler.

    Any suggestions as to where I go from here? Does anybody know of any known issues with Qwtplot3d combined with Qt 5?

    Below is the first part of the .pro file of my test project. Am I doing something wrong when linking to the library?

    @QT += core gui
    QT += printsupport
    QT += opengl

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    INCLUDEPATH += "D:/Qt/qwtplot3d/include"
    LIBS += D:/Qt/build-qwtplot3d-Desktop_Qt_5_1_0_MinGW_32bit-Debug/lib/qwtplot3d.dll

    TARGET = EngineMatch_1
    TEMPLATE = app@

    Grateful for any help or advice. I'm quite stuck at the moment.

    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