<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qwtplot3d with Qt 5, Qt Creator and MinGW?]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">As a test, I've created a project with a pushbutton, and connected the click event of this button to the code</p>
<p dir="auto">@1.SurfacePlot *plot3 = new SurfacePlot(this);@</p>
<p dir="auto">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: <a href="http://qt-project.org/forums/viewthread/12838" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/forums/viewthread/12838</a></p>
<p dir="auto">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."</p>
<p dir="auto">I'm using Qt Creator with Qt 5 on Windows, with the mingw compiler.</p>
<p dir="auto">Any suggestions as to where I go from here? Does anybody know of any known issues with Qwtplot3d combined with Qt 5?</p>
<p dir="auto">Below is the first part of the .pro file of my test project. Am I doing something wrong when linking to the library?</p>
<p dir="auto">@QT       += core gui<br />
QT += printsupport<br />
QT += opengl</p>
<p dir="auto">greaterThan(QT_MAJOR_VERSION, 4): QT += widgets</p>
<p dir="auto">INCLUDEPATH += "D:/Qt/qwtplot3d/include"<br />
LIBS += D:/Qt/build-qwtplot3d-Desktop_Qt_5_1_0_MinGW_32bit-Debug/lib/qwtplot3d.dll</p>
<p dir="auto">TARGET = EngineMatch_1<br />
TEMPLATE = app@</p>
<p dir="auto">Grateful for any help or advice. I'm quite stuck at the moment.</p>
]]></description><link>https://forum.qt.io/topic/33361/qwtplot3d-with-qt-5-qt-creator-and-mingw</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 00:16:07 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/33361.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Oct 2013 08:27:42 GMT</pubDate><ttl>60</ttl></channel></rss>