<?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[[Qt]qmake and updating makefile]]></title><description><![CDATA[<p>Hello,<br />
I bought the book &quot;Prentice Hall PTR: C++ GUI Programming with Qt 3&quot;. There's a chapter 2 (Subclassing dialogs) and there's the following text:</p>
<blockquote>
<p>Visual C++'s output starts like this:</p>
<p>finddialog.obj : error LNK2001: unresolved external symbol<br />
&quot;public:~virtual bool __thiscall FindDialog::qt_property(int,<br />
int,class QVariant *)&quot;</p>
<p>If this ever happens to you, run qmake again to update the makefile, then rebuild the application.</p>
</blockquote>
<p>I tried that few times but it doesn't working at all. My Visual Studio gives exatly such an error.<br />
How I tried:<br />
Start-&gt;Run-&gt;cmd - gone to the &quot;qmake&quot;-directory and typed in &quot;qmake.exe -tp vc findDialog/dialog.pro&quot;, everything seems to be ok, but if I want rebuild in vstudio the same errors are caming again! What's wrong or was it my fault? Please help me to fix this problem <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Here my SourceCode:</p>
<pre><code class="language-cpp">#include&lt;qapplication.h&gt;
#include&lt;qcheckbox.h&gt;
#include&lt;qlabel.h&gt;
#include&lt;qlayout.h&gt;
#include&lt;qlineedit.h&gt;
#include&lt;qpushbutton.h&gt;

#ifndef FINDDIALOG_H
#define FINDDIALOG_H
#include&lt;qdialog.h&gt;

class QCheckBox;
class QLabel;
class QLineEdit;
class QPushbutton;

class FindDialog : public QDialog
{
	Q_OBJECT
public:
	FindDialog(QWidget *parent = 0, const char *name = 0);
signals:
	void findNext(const QString &amp;str, bool CaseSensitive);
	void findPrev(const QString &amp;str, bool CaseSensitive);
private slots:
	void findClicked();
	void enableFindButton(const QString &amp;text);
private:
	QLabel *label;
	QLineEdit *lineEdit;
	QCheckBox *caseCheckBox;
	QCheckBox *backwardCheckBox;
	QPushButton *findButton;
	QPushButton *closeButton;
};

#endif

FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent, name)
{
	setCaption(tr(&quot;Find&quot;));

	label = new QLabel(tr(&quot;Find &amp;what:&quot;), this);
	lineEdit = new QLineEdit(this);
	label-&gt;setBuddy(lineEdit);

	caseCheckBox = new QCheckBox(tr(&quot;Match &amp;case&quot;), this);
	backwardCheckBox = new QCheckBox(tr(&quot;Search &amp;backward&quot;), this);

	findButton = new QPushButton(tr(&quot;&amp;Find&quot;), this);
	findButton-&gt;setDefault(true);
	findButton-&gt;setEnabled(false);

	closeButton = new QPushButton(tr(&quot;Close&quot;), this);

	connect(lineEdit, SIGNAL(textChanged(const QString &amp;)), this, SLOT(enableFindButton(const QString &amp;)));
	connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
	connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

	QHBoxLayout *topLeftLayout = new QHBoxLayout;
	topLeftLayout-&gt;addWidget(label);
	topLeftLayout-&gt;addWidget(lineEdit);

	QVBoxLayout *leftLayout = new QVBoxLayout;
	leftLayout-&gt;addLayout(topLeftLayout);
	leftLayout-&gt;addWidget(caseCheckBox);
	leftLayout-&gt;addWidget(backwardCheckBox);

	QVBoxLayout *rightLayout = new QVBoxLayout;
	rightLayout-&gt;addWidget(findButton);
	rightLayout-&gt;addWidget(closeButton);
	rightLayout-&gt;addStretch(1);

	QHBoxLayout *mainLayout = new QHBoxLayout(this);
	mainLayout-&gt;setMargin(11);
	mainLayout-&gt;setSpacing(6);
	mainLayout-&gt;addLayout(leftLayout);
	mainLayout-&gt;addLayout(rightLayout);
}

void FindDialog::findClicked()
{
	QString text = lineEdit-&gt;text();
	bool caseSensitive = caseCheckBox-&gt;isOn();

	if(backwardCheckBox-&gt;isOn()) emit findPrev(text, caseSensitive);
	else emit findNext(text, CaseSensitive);
}

void FindDialog::enableFindButton(const QString &amp;text)
{
	findButton-&gt;setEnabled(!text.isEmpty());
}

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	FindDialog *dialog = new FindDialog;
	app.setMainWidget(dialog);
	dialog-&gt;show();
	return app.exec();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/77118/qt-qmake-and-updating-makefile</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 15:28:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/77118.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jun 2004 16:58:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Qt]qmake and updating makefile on Thu, 17 Jun 2004 16:58:15 GMT]]></title><description><![CDATA[<p>Hello,<br />
I bought the book &quot;Prentice Hall PTR: C++ GUI Programming with Qt 3&quot;. There's a chapter 2 (Subclassing dialogs) and there's the following text:</p>
<blockquote>
<p>Visual C++'s output starts like this:</p>
<p>finddialog.obj : error LNK2001: unresolved external symbol<br />
&quot;public:~virtual bool __thiscall FindDialog::qt_property(int,<br />
int,class QVariant *)&quot;</p>
<p>If this ever happens to you, run qmake again to update the makefile, then rebuild the application.</p>
</blockquote>
<p>I tried that few times but it doesn't working at all. My Visual Studio gives exatly such an error.<br />
How I tried:<br />
Start-&gt;Run-&gt;cmd - gone to the &quot;qmake&quot;-directory and typed in &quot;qmake.exe -tp vc findDialog/dialog.pro&quot;, everything seems to be ok, but if I want rebuild in vstudio the same errors are caming again! What's wrong or was it my fault? Please help me to fix this problem <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Here my SourceCode:</p>
<pre><code class="language-cpp">#include&lt;qapplication.h&gt;
#include&lt;qcheckbox.h&gt;
#include&lt;qlabel.h&gt;
#include&lt;qlayout.h&gt;
#include&lt;qlineedit.h&gt;
#include&lt;qpushbutton.h&gt;

#ifndef FINDDIALOG_H
#define FINDDIALOG_H
#include&lt;qdialog.h&gt;

class QCheckBox;
class QLabel;
class QLineEdit;
class QPushbutton;

class FindDialog : public QDialog
{
	Q_OBJECT
public:
	FindDialog(QWidget *parent = 0, const char *name = 0);
signals:
	void findNext(const QString &amp;str, bool CaseSensitive);
	void findPrev(const QString &amp;str, bool CaseSensitive);
private slots:
	void findClicked();
	void enableFindButton(const QString &amp;text);
private:
	QLabel *label;
	QLineEdit *lineEdit;
	QCheckBox *caseCheckBox;
	QCheckBox *backwardCheckBox;
	QPushButton *findButton;
	QPushButton *closeButton;
};

#endif

FindDialog::FindDialog(QWidget *parent, const char *name) : QDialog(parent, name)
{
	setCaption(tr(&quot;Find&quot;));

	label = new QLabel(tr(&quot;Find &amp;what:&quot;), this);
	lineEdit = new QLineEdit(this);
	label-&gt;setBuddy(lineEdit);

	caseCheckBox = new QCheckBox(tr(&quot;Match &amp;case&quot;), this);
	backwardCheckBox = new QCheckBox(tr(&quot;Search &amp;backward&quot;), this);

	findButton = new QPushButton(tr(&quot;&amp;Find&quot;), this);
	findButton-&gt;setDefault(true);
	findButton-&gt;setEnabled(false);

	closeButton = new QPushButton(tr(&quot;Close&quot;), this);

	connect(lineEdit, SIGNAL(textChanged(const QString &amp;)), this, SLOT(enableFindButton(const QString &amp;)));
	connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
	connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

	QHBoxLayout *topLeftLayout = new QHBoxLayout;
	topLeftLayout-&gt;addWidget(label);
	topLeftLayout-&gt;addWidget(lineEdit);

	QVBoxLayout *leftLayout = new QVBoxLayout;
	leftLayout-&gt;addLayout(topLeftLayout);
	leftLayout-&gt;addWidget(caseCheckBox);
	leftLayout-&gt;addWidget(backwardCheckBox);

	QVBoxLayout *rightLayout = new QVBoxLayout;
	rightLayout-&gt;addWidget(findButton);
	rightLayout-&gt;addWidget(closeButton);
	rightLayout-&gt;addStretch(1);

	QHBoxLayout *mainLayout = new QHBoxLayout(this);
	mainLayout-&gt;setMargin(11);
	mainLayout-&gt;setSpacing(6);
	mainLayout-&gt;addLayout(leftLayout);
	mainLayout-&gt;addLayout(rightLayout);
}

void FindDialog::findClicked()
{
	QString text = lineEdit-&gt;text();
	bool caseSensitive = caseCheckBox-&gt;isOn();

	if(backwardCheckBox-&gt;isOn()) emit findPrev(text, caseSensitive);
	else emit findNext(text, CaseSensitive);
}

void FindDialog::enableFindButton(const QString &amp;text)
{
	findButton-&gt;setEnabled(!text.isEmpty());
}

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	FindDialog *dialog = new FindDialog;
	app.setMainWidget(dialog);
	dialog-&gt;show();
	return app.exec();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/542591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/542591</guid><dc:creator><![CDATA[ut&#96;ler]]></dc:creator><pubDate>Thu, 17 Jun 2004 16:58:15 GMT</pubDate></item></channel></rss>