<?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[Error while calling other class.]]></title><description><![CDATA[<ul>
<li>I am getting an error when I am trying to call another class(<code>ImportDICOMBrowser</code>) in <code>qSlicerMainWindow</code>  through <code>on_LoadAction_triggered</code> action.</li>
</ul>
<p dir="auto"><code>#include "importdicombrowser.h"</code></p>
<pre><code>void qSlicerMainWindow::on_LoadAction_triggered()
{
  ImportDICOMBrowser* temp = new ImportDICOMBrowser(this);
  temp-&gt;show();
}
</code></pre>
<ul>
<li><code>ImportDICOMBrowser.h</code></li>
</ul>
<pre><code>#ifndef IMPORTDICOMBROWSER_H
#define IMPORTDICOMBROWSER_H

#include &lt;QDialog&gt;

namespace Ui {
class ImportDICOMBrowser;
}

class ImportDICOMBrowser : public QDialog
{
    Q_OBJECT

public:
    explicit ImportDICOMBrowser(QWidget *parent = nullptr);
    ~ImportDICOMBrowser();

private:
    Ui::ImportDICOMBrowser *ui;
};

#endif // IMPORTDICOMBROWSER_H
</code></pre>
<ul>
<li><code>ImportDICOMBrowser.cxx</code></li>
</ul>
<pre><code>#include "importdicombrowser.h"
#include "ui_importdicombrowser.h"

ImportDICOMBrowser::ImportDICOMBrowser(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ImportDICOMBrowser)
{
    ui-&gt;setupUi(this);
}

ImportDICOMBrowser::~ImportDICOMBrowser()
{
    delete ui;
}
</code></pre>
<ul>
<li>ERROR:</li>
</ul>
<pre><code>Error	LNK2019	unresolved external symbol "public: __cdecl ImportDICOMBrowser::ImportDICOMBrowser(class QWidget *)" (??0ImportDICOMBrowser@@QEAA@PEAVQWidget@@@Z) referenced in function "public: void __cdecl qSlicerMainWindow::on_LoadAction_triggered(void)" (?on_LoadAction_triggered@qSlicerMainWindow@@QEAAXXZ) 
</code></pre>
<ul>
<li>I am not able to understand why is it showing <code>ImportDICOMBrowser</code> as an external variable, I also included the hearder file <code>#include "importdicombrowser.h"</code></li>
</ul>
]]></description><link>https://forum.qt.io/topic/128136/error-while-calling-other-class</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 10:58:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/128136.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Jul 2021 14:29:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Error while calling other class. on Fri, 02 Jul 2021 17:30:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meera-hadid">@<bdi>Meera-Hadid</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> is asking you when and how <code>ImportDICOMBrowser.cxx</code> gets compiled during your build process?  For <code>qSlicerMainWindow </code> to call anything about class <code>ImportDICOMBrowser</code> that will need compiling and linking with your  <code>qSlicerMainWindow </code> stuff.</p>
]]></description><link>https://forum.qt.io/post/668628</link><guid isPermaLink="true">https://forum.qt.io/post/668628</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to Error while calling other class. on Fri, 02 Jul 2021 15:43:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> I didn't understand your question, can you please elaborate.</p>
]]></description><link>https://forum.qt.io/post/668611</link><guid isPermaLink="true">https://forum.qt.io/post/668611</guid><dc:creator><![CDATA[Meera Hadid]]></dc:creator><pubDate>Fri, 02 Jul 2021 15:43:33 GMT</pubDate></item><item><title><![CDATA[Reply to Error while calling other class. on Fri, 02 Jul 2021 15:03:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meera-hadid">@<bdi>Meera-Hadid</bdi></a> said in <a href="/post/668594">Error while calling other class.</a>:</p>
<blockquote>
<p dir="auto">ImportDICOMBrowser.cxx</p>
</blockquote>
<p dir="auto">Do you actually compile this source when building your application?</p>
]]></description><link>https://forum.qt.io/post/668603</link><guid isPermaLink="true">https://forum.qt.io/post/668603</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Fri, 02 Jul 2021 15:03:53 GMT</pubDate></item></channel></rss>