<?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[Can no longer build due to no matching function.]]></title><description><![CDATA[<p dir="auto">My Qt project has been running fine, and all the code was working. However I realised I had added an incorrect UI file as I needed one with a menu bar. I deleted the original UI file and replaced it. My code however was still somehow calling the original UI file. I cleaned the project and ran QMake on it, as well as retyping the code to call it and still had no luck. The project complied but it didn't use the right file and I had no idea where it was getting the old one from.</p>
<p dir="auto">I then took the user files out of the folder to see if that would force it to rebuild and rescan all the files. All that did however was give me an error. I removed the new user files and put the old ones back in and now it just throw up the error:</p>
<ul>
<li>no matching function for call to 'Ui::behindlogin::setupUi(behindlogin* const)'</li>
</ul>
<p dir="auto">and it can't compile. I need to hand the first version of my project in on Friday and I can't even get it to run anymore!</p>
]]></description><link>https://forum.qt.io/topic/52593/can-no-longer-build-due-to-no-matching-function</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:21:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/52593.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Mar 2015 20:18:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Sat, 28 Mar 2015 21:01:21 GMT]]></title><description><![CDATA[<p dir="auto">Good !</p>
<p dir="auto">You're welcome !</p>
<p dir="auto">Don't forget to mark the thread as [solved] so other forum users may know a solution has been found :)</p>
]]></description><link>https://forum.qt.io/post/267451</link><guid isPermaLink="true">https://forum.qt.io/post/267451</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 28 Mar 2015 21:01:21 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 23:09:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Ahhh thank you so much! It's all sorted now, I've added my final bits of code and no more errors!</p>
<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> for all the help and thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> as well!</p>
]]></description><link>https://forum.qt.io/post/267356</link><guid isPermaLink="true">https://forum.qt.io/post/267356</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Fri, 27 Mar 2015 23:09:29 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 22:08:11 GMT]]></title><description><![CDATA[<p dir="auto">Circular dependencies !</p>
<p dir="auto">You are including mainwindow.h in behinglogin.h and behindlogin.h in mainwindow.h.</p>
<p dir="auto">You can remove both includes: in behindlogin.h because you don't use it at all and in mainwindow.h because you can use  forward declarations when declaring pointer data members. That also helps avoid including many headers to use your class.</p>
]]></description><link>https://forum.qt.io/post/267350</link><guid isPermaLink="true">https://forum.qt.io/post/267350</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 27 Mar 2015 22:08:11 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 18:52:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> The full message is:</p>
<p dir="auto">In file included from /behindlogin.h<br />
from behindlogin.cpp<br />
behindlogin does not name a type.</p>
<p dir="auto">and the line of code it's flagging is:</p>
<pre><code>
    behindlogin *behindLogin;</code></pre>
]]></description><link>https://forum.qt.io/post/267330</link><guid isPermaLink="true">https://forum.qt.io/post/267330</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Fri, 27 Mar 2015 18:52:13 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 16:25:31 GMT]]></title><description><![CDATA[<p dir="auto">Hmm... I can't see any mistakes in the code.</p>
<p dir="auto">What's the full error message? Which line in which file is the error in?</p>
]]></description><link>https://forum.qt.io/post/267312</link><guid isPermaLink="true">https://forum.qt.io/post/267312</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 27 Mar 2015 16:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 11:53:05 GMT]]></title><description><![CDATA[<p dir="auto">Pro:</p>
<pre><code class="language-#-------------------------------------------------">#
# Project created by QtCreator 2015-03-25T23:10:30
#
#-------------------------------------------------

QT       += core gui sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = project
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    behindlogin.cpp \
    offlinebehind.cpp \
    savingwindow.cpp

HEADERS  += mainwindow.h \
    behindlogin.h \
    offlinebehind.h \
    savingwindow.h

FORMS    += mainwindow.ui \
    behindlogin.ui \
    offlinebehind.ui \
    savingwindow.ui
</code></pre>
<p dir="auto">behindlogin.h</p>
<pre><code>#ifndef BEHINDLOGIN_H
#define BEHINDLOGIN_H

#include &lt;QMainWindow&gt;
#include "mainwindow.h"

namespace Ui {
class behindlogin;
}

class behindlogin : public QMainWindow
{
    Q_OBJECT

public:
    explicit behindlogin(QWidget *parent = 0);
    ~behindlogin();

private slots:
    void on_actionExit_triggered();

    void on_actionNew_Data_triggered();

private:
    Ui::behindlogin *ui;
};

#endif // BEHINDLOGIN_H
</code></pre>
<p dir="auto">mainwindow.h:</p>
<pre><code>
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "behindlogin.h"
#include &lt;QMainWindow&gt;
#include &lt;QtSql&gt;
#include &lt;QtDebug&gt;
#include &lt;QFileInfo&gt;


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    QSqlDatabase mydb;
    void  connClose(){
        mydb.close();
        mydb.removeDatabase(QSqlDatabase::defaultConnection);
    }

    bool connOpen()
    {

        mydb=QSqlDatabase::addDatabase("QSQLITE");
        mydb.setDatabaseName("C:/Users/Jack/Desktop/ProjNEW/SQlite/dataset.db.sqlite");

        if(!mydb.open()){
           qDebug()&lt;&lt;("Disconnected..");
           return false;
        }
        else{
            qDebug()&lt;&lt;("Connected..");
            return true;
           }

    }

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:

    void on_LoginButton_clicked();

    void on_actionOpen_triggered();

    void on_actionExit_triggered();

private:
    Ui::MainWindow *ui;
    behindlogin *behindLogin;
};

#endif // MAINWINDOW_H</code></pre>
]]></description><link>https://forum.qt.io/post/267251</link><guid isPermaLink="true">https://forum.qt.io/post/267251</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Fri, 27 Mar 2015 11:53:05 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 11:02:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dejarked">@<bdi>dejarked</bdi></a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> Hey, it is exactly the same as it is in the tutorial and the header file was the first thing I checked, behindlogin.h is included in my mainwindow.h which is where I'm trying to declare it.</p>
</blockquote>
<p dir="auto">Can you post:</p>
<ol>
<li>The contents of your .pro file</li>
<li>The contents of behindlogin.h</li>
<li>The contents of mainwindow.h ?</li>
</ol>
]]></description><link>https://forum.qt.io/post/267237</link><guid isPermaLink="true">https://forum.qt.io/post/267237</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 27 Mar 2015 11:02:12 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 10:50:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> Hey, it is exactly the same as it is in the tutorial and the header file was the first thing I checked, behindlogin.h is included in my mainwindow.h which is where I'm trying to declare it.</p>
]]></description><link>https://forum.qt.io/post/267234</link><guid isPermaLink="true">https://forum.qt.io/post/267234</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Fri, 27 Mar 2015 10:50:44 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 02:01:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dejarked">@<bdi>dejarked</bdi></a> said:</p>
<blockquote>
<p dir="auto">in the main cpp file but it's saying that behindlogin does not name a type?</p>
</blockquote>
<p dir="auto">That means you forgot to #include the header that defines the <code>behindlogin</code>.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dejarked">@<bdi>dejarked</bdi></a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Uh, honestly I'm not sure.. I'm very new to Qt and I've been following tutorials. Everything I've looked at makes it look like this should work but I can't figure out what I'm doing incorrectly.</p>
</blockquote>
<p dir="auto">Is your code exactly the same as what's in the tutorial?</p>
]]></description><link>https://forum.qt.io/post/267168</link><guid isPermaLink="true">https://forum.qt.io/post/267168</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 27 Mar 2015 02:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Fri, 27 Mar 2015 01:06:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Uh, honestly I'm not sure.. I'm very new to Qt and I've been following tutorials. Everything I've looked at makes it look like this should work but I can't figure out what I'm doing incorrectly.</p>
]]></description><link>https://forum.qt.io/post/267162</link><guid isPermaLink="true">https://forum.qt.io/post/267162</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Fri, 27 Mar 2015 01:06:26 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 22:30:13 GMT]]></title><description><![CDATA[<p dir="auto">Is behindlogin a member variable of a class ?</p>
]]></description><link>https://forum.qt.io/post/267135</link><guid isPermaLink="true">https://forum.qt.io/post/267135</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 26 Mar 2015 22:30:13 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 10:02:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Right, so I've replaced it with</p>
<pre><code class="language-private:">                behindlogin *behindLogin;
</code></pre>
<p dir="auto">in the header file and then</p>
<pre><code class="language-this-&gt;hide();">            behindLogin =new behindlogin(this);
            behindLogin-&gt;show();
</code></pre>
<p dir="auto">in the main cpp file but it's saying that behindlogin does not name a type?</p>
]]></description><link>https://forum.qt.io/post/267022</link><guid isPermaLink="true">https://forum.qt.io/post/267022</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Thu, 26 Mar 2015 10:02:18 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:38:32 GMT]]></title><description><![CDATA[<p dir="auto">If you have something like:</p>
<pre><code>{
    behindlogin behindlogin;
    behindlogin.show();
    connClose();
} &lt;- behindlogin is destroyed here
</code></pre>
]]></description><link>https://forum.qt.io/post/266957</link><guid isPermaLink="true">https://forum.qt.io/post/266957</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:38:32 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:36:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> The code actually compiles now! Thank you, the only issue left is I've replaced the code with</p>
<pre><code class="language-this-&gt;hide();">            behindlogin behindlogin;
            behindlogin.show();
            connClose();


Which causes the window to open and them immediately close after</code></pre>
]]></description><link>https://forum.qt.io/post/266956</link><guid isPermaLink="true">https://forum.qt.io/post/266956</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:36:20 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:26:08 GMT]]></title><description><![CDATA[<p dir="auto">So problem solved ? :)</p>
]]></description><link>https://forum.qt.io/post/266955</link><guid isPermaLink="true">https://forum.qt.io/post/266955</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:26:08 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:25:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Ahh yes, I've changed from a Dialog to a MainWindow as I wanted the menu bar at the top.</p>
]]></description><link>https://forum.qt.io/post/266954</link><guid isPermaLink="true">https://forum.qt.io/post/266954</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:25:12 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:22:40 GMT]]></title><description><![CDATA[<p dir="auto">You're welcome !</p>
<p dir="auto">setModal and exec are methods from QDialog. From what I understood you have a QMainWindow, no ?</p>
]]></description><link>https://forum.qt.io/post/266952</link><guid isPermaLink="true">https://forum.qt.io/post/266952</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:22:40 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:21:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Right, sorry to be causing so many problems, but thank you for the help! Everything is working now, I missed some of the includes, however I can't use .setModal(true); on a new window opening because it's saying the class has no member called setModal</p>
<pre><code class="language-this-&gt;hide();">            behindlogin behindlogin;
            behindlogin.setModal(true);
            behindlogin.exec();
            connClose();</code></pre>
]]></description><link>https://forum.qt.io/post/266951</link><guid isPermaLink="true">https://forum.qt.io/post/266951</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:21:42 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Thu, 26 Mar 2015 00:11:14 GMT]]></title><description><![CDATA[<p dir="auto">Did you check that all names were matching ? Ui widget name vs C++ widget name ?</p>
]]></description><link>https://forum.qt.io/post/266947</link><guid isPermaLink="true">https://forum.qt.io/post/266947</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 26 Mar 2015 00:11:14 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Wed, 25 Mar 2015 23:40:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Yup, new folder, new project I created all new files in Qt added all my GUI back, followed to slot, then copied the code in and still get the same error</p>
]]></description><link>https://forum.qt.io/post/266940</link><guid isPermaLink="true">https://forum.qt.io/post/266940</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Wed, 25 Mar 2015 23:40:51 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Wed, 25 Mar 2015 23:39:52 GMT]]></title><description><![CDATA[<p dir="auto">So, recreating your widget from scratch in a new project and just copying the slot code gives you the same error ?</p>
]]></description><link>https://forum.qt.io/post/266939</link><guid isPermaLink="true">https://forum.qt.io/post/266939</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 25 Mar 2015 23:39:52 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Wed, 25 Mar 2015 23:37:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Right, I only copied the code from the old slots directly into the ones in the new project made by Qt, still getting the same error.</p>
]]></description><link>https://forum.qt.io/post/266938</link><guid isPermaLink="true">https://forum.qt.io/post/266938</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Wed, 25 Mar 2015 23:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Wed, 25 Mar 2015 23:06:45 GMT]]></title><description><![CDATA[<p dir="auto">Don't overwrite the new files with the content of the old one, just cherry-pick the modifications you made e.g. slot added etc.</p>
]]></description><link>https://forum.qt.io/post/266934</link><guid isPermaLink="true">https://forum.qt.io/post/266934</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 25 Mar 2015 23:06:45 GMT</pubDate></item><item><title><![CDATA[Reply to Can no longer build due to no matching function. on Wed, 25 Mar 2015 22:59:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> So, I just copied over all the code to a completely new project in a new folder and Qt is still throwing me the same error as in the original post.</p>
]]></description><link>https://forum.qt.io/post/266933</link><guid isPermaLink="true">https://forum.qt.io/post/266933</guid><dc:creator><![CDATA[dejarked]]></dc:creator><pubDate>Wed, 25 Mar 2015 22:59:55 GMT</pubDate></item></channel></rss>