<?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[Initialzing QSurfaceDataProxy Problems]]></title><description><![CDATA[<p dir="auto">I'm simply trying to use QSurfaceDataProxy in my c++ code, so that I can do:</p>
<pre><code>negativeTabView-&gt;findChild&lt;QSurfaceDataProxy *&gt;("proxyTest");
</code></pre>
<p dir="auto">Where 'negativeTabView' is a QQuickView object, and 'proxyTest' is the ItemModelSurfaceDataProxy from  a Surface3DSeries in QML, like this:</p>
<pre><code>Surface3DSeries {
                id: surfaceSeries
                flatShadingEnabled: false
                drawMode: Surface3DSeries.DrawSurface
                baseGradient: surfaceGradient
                colorStyle: Theme3D.ColorStyleRangeGradient
                itemLabelFormat: "(@xLabel, @zLabel): @yLabel"
                onSelectedPointChanged: getSurfaceDataItem(itemLabel, selectedPoint)


                ItemModelSurfaceDataProxy {
                    id:surfaceSeriesDataProxy
                    objectName: proxyTest
                    itemModel: surfaceData0.model
                    rowRole: "radius"
                    columnRole: "angle"
                    yPosRole: "value"
                }
            }
</code></pre>
<p dir="auto">I cannot share my full code, but in my main.h I have included QSurfaceDataProxy, added the namespace, and added one QSurfaceDataProxy object in the private section, as such:</p>
<pre><code>#include &lt;QtDataVisualization/QSurfaceDataProxy&gt;
using namespace QtDataVisualization;
...
 QSurfaceDataProxy *m_dataProxy;

</code></pre>
<p dir="auto">In my main.cpp I have done included the same line</p>
<pre><code>#include &lt;QtDataVisualization/QSurfaceDataProxy&gt;
</code></pre>
<p dir="auto">without the namespace. If I try to instantiate the m_dataproxy variable like such:</p>
<pre><code> m_dataProxy = new QSurfaceDataProxy();
</code></pre>
<p dir="auto">or</p>
<pre><code> m_dataProxy = negativeTabView-&gt;findChild&lt;QSurfaceDataProxy *&gt;("proxyTest");
</code></pre>
<p dir="auto">It will lead to this error (full path removed)</p>
<pre><code>C:\\....main.cpp:-1: error: undefined reference to `__imp__ZN19QtDataVisualization17QSurfaceDataProxyC1EP7QObject'
</code></pre>
<p dir="auto">What am I doing wrong?<br />
Here is the top of my .pro file:</p>
<pre><code>QT       += core gui charts quickwidgets qml quick

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport

CONFIG += c++11
</code></pre>
<p dir="auto">What am I doing wrong?<br />
Using <a href="https://doc.qt.io/qt-5.9/qtdatavisualization-surface-surfacegraph-h.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5.9/qtdatavisualization-surface-surfacegraph-h.html</a> as reference, they seem to instantiate their QSurfaceDataProxy in the same manner with no issues.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.qt.io/topic/114193/initialzing-qsurfacedataproxy-problems</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 23:03:47 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/114193.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Apr 2020 20:29:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Initialzing QSurfaceDataProxy Problems on Wed, 29 Apr 2020 11:52:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a><br />
Ah man I thought I added that to the pro file. Thanks jsulm.</p>
<p dir="auto">Marked resolved.</p>
]]></description><link>https://forum.qt.io/post/591547</link><guid isPermaLink="true">https://forum.qt.io/post/591547</guid><dc:creator><![CDATA[LordOfTheMorning]]></dc:creator><pubDate>Wed, 29 Apr 2020 11:52:15 GMT</pubDate></item><item><title><![CDATA[Reply to Initialzing QSurfaceDataProxy Problems on Wed, 29 Apr 2020 07:14:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lordofthemorning">@<bdi>LordOfTheMorning</bdi></a> Please read <a href="https://doc.qt.io/qt-5/qtdatavisualization-index.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qtdatavisualization-index.html</a><br />
You have to add</p>
<pre><code>QT += datavisualization
</code></pre>
]]></description><link>https://forum.qt.io/post/591492</link><guid isPermaLink="true">https://forum.qt.io/post/591492</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 29 Apr 2020 07:14:01 GMT</pubDate></item></channel></rss>