<?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[Application takes huge amount of ram]]></title><description><![CDATA[<p dir="auto">I made application with stacked widgets<br />
The stacked widgets have 10 widgets inside<br />
Some of the widgets have stacked widgets too.<br />
There are 18 forms total. They are navigated with navigation bar.</p>
<p dir="auto">At the begining it takes more than 2GB of ram but the cpu and disk usage isn't that high.<br />
It launches so slow too.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/e4a155f3-9868-47bf-8f85-53f236806cdc.png" alt="ab2ec328-5873-40d5-b9ff-e11a06e7fd55-image.png" class=" img-fluid img-markdown" /><br />
At first it says not responding. After almost 30 seconds the application opens and while using it , it takes more than 1GB of RAM<br />
All of these data are taken from task manager<img src="https://ddgobkiprc33d.cloudfront.net/14551c8b-670a-4bc0-b247-c80597abff20.png" alt="e81afbea-3f55-44c4-95ca-e9fd38104f76-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">What can I do to solve this problem??</p>
]]></description><link>https://forum.qt.io/topic/126853/application-takes-huge-amount-of-ram</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 06:33:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/126853.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 May 2021 08:22:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Application takes huge amount of ram on Tue, 25 May 2021 10:29:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
FIXED BUT<br />
I have 9 tables with max 28 columns and min of 8 columns.<br />
On every database query I am using saving type of query(like on every transaction)<br />
Sir problem is solved now. I uninstalled and installed the Qt(same offline installer). It is using just 200-300mb ram on average and it's not that problem. I don't know the reason but problem is fixed. The problem is fixed but do you have any idea , why this happened?</p>
]]></description><link>https://forum.qt.io/post/661452</link><guid isPermaLink="true">https://forum.qt.io/post/661452</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Tue, 25 May 2021 10:29:28 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Mon, 24 May 2021 19:08:43 GMT]]></title><description><![CDATA[<p dir="auto">How many transaction are we looking at ?<br />
How are you storing them ?</p>
]]></description><link>https://forum.qt.io/post/661345</link><guid isPermaLink="true">https://forum.qt.io/post/661345</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 24 May 2021 19:08:43 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Mon, 24 May 2021 05:06:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
It's like CRUD application but it saves every transaction,<br />
It has 8 tables<br />
It shows all inserted data, prepare simple report in tableView.<br />
There are almost 50 queries within the program</p>
]]></description><link>https://forum.qt.io/post/661199</link><guid isPermaLink="true">https://forum.qt.io/post/661199</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Mon, 24 May 2021 05:06:32 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sun, 23 May 2021 19:09:20 GMT]]></title><description><![CDATA[<p dir="auto">Since you have a database, what are you loading from it ?</p>
]]></description><link>https://forum.qt.io/post/661181</link><guid isPermaLink="true">https://forum.qt.io/post/661181</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 23 May 2021 19:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sun, 23 May 2021 10:22:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a></p>
<pre><code>#ifndef DATABASE_H
#define DATABASE_H

#pragma once
#include&lt;QString&gt;
#include&lt;QFile&gt;
#include&lt;QMessageBox&gt;
#include&lt;QDebug&gt;
#include&lt;ctime&gt;
#include&lt;QTextStream&gt;
#include&lt;errorsexpress.h&gt;
#include&lt;QSql&gt;
#include&lt;QtSql/QSql&gt;
#include&lt;QtSql/QSqlDatabase&gt;
#include&lt;QtSql/QSqlQuery&gt;
#include&lt;QtSql/QSqlDriver&gt;
#include&lt;QtSql/QSqlQuery&gt;
#include&lt;QtSql/QSqlQueryModel&gt;
#include&lt;QSqlError&gt;

class database
{

public:
    database();
    QString readTextFile(QString path);
    QString getDatabaseName();

    QString getUsername();
    QString getId();
    QString getPost();

    void saveRequest(QString user_id ,QString special_value, QString operation,QString page);
    ErrorsExpress ERRORS;

};

#endif // DATABASE_H

</code></pre>
<p dir="auto">database.cpp implements just these functions straight forward. Contains all headers that are needed in every other files<br />
It is included in every files.<br />
Please say something on these<br />
<strong>But if I leave the application for about 5 minutes ,<br />
it just takes 120 - 160mb or less than that of ram .<br />
What may be the reason</strong></p>
]]></description><link>https://forum.qt.io/post/661120</link><guid isPermaLink="true">https://forum.qt.io/post/661120</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Sun, 23 May 2021 10:22:07 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sun, 23 May 2021 08:16:51 GMT]]></title><description><![CDATA[<p dir="auto">Profile your application to see what eats memory.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thank-you">@<bdi>Thank-You</bdi></a> said in <a href="/post/660856">Application takes huge amount of ram</a>:</p>
<blockquote>
<p dir="auto">database d;</p>
</blockquote>
<p dir="auto">That thing here we know nothing about so it might be as well it that is leaking memory depending on how you use it and what it does.</p>
]]></description><link>https://forum.qt.io/post/661101</link><guid isPermaLink="true">https://forum.qt.io/post/661101</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 23 May 2021 08:16:51 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sun, 23 May 2021 03:13:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
But if I leave the application for about 5 minutes ,<br />
it just takes 120 - 160mb or less than that of ram .<br />
What may be the reason</p>
]]></description><link>https://forum.qt.io/post/661076</link><guid isPermaLink="true">https://forum.qt.io/post/661076</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Sun, 23 May 2021 03:13:19 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sat, 22 May 2021 19:16:19 GMT]]></title><description><![CDATA[<p dir="auto">Unused stuff can get optimized out by the compiler hence no memory allocated.</p>
<p dir="auto">Without any information about what the reports give you it's hard to answer.</p>
<p dir="auto">Note that detectors might find false positives. For example Valgrind needs suppression files to remove some stuff that it detects as errors which are in fact not.</p>
]]></description><link>https://forum.qt.io/post/661045</link><guid isPermaLink="true">https://forum.qt.io/post/661045</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 22 May 2021 19:16:19 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sat, 22 May 2021 05:44:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a>  and <a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a>  sir,<br />
Can you see this?</p>
]]></description><link>https://forum.qt.io/post/660966</link><guid isPermaLink="true">https://forum.qt.io/post/660966</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Sat, 22 May 2021 05:44:18 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Sat, 22 May 2021 09:31:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artwaw">@<bdi>artwaw</bdi></a> I used Deleaker sir.<br />
Followed official documentation to do my work but it just show this<br />
On my application it says leaking in just 5 files and with very low allocation size whereas it shows huge allocation in QtLibraries<br />
I have used SQLITE for fetching data in every page again it inserts data from all pages and keep tracks of every transaction.</p>
<p dir="auto">This is updated code that I use<br />
I have promoted widgets in stacked widgets</p>
<p dir="auto">Just updated version of upper codes</p>
<pre><code>#ifndef MAINWIN_H
#define MAINWIN_H

#include &lt;QMainWindow&gt;
#pragma once
#include&lt;database.h&gt;
#include&lt;quitdialog.h&gt;






QT_BEGIN_NAMESPACE
namespace Ui { class mainwin; }
QT_END_NAMESPACE

class mainwin : public QMainWindow
{
    Q_OBJECT

public:
    mainwin(QWidget *parent = nullptr);
    ~mainwin();
    void connections();
    void closeEvent(QCloseEvent *event);
    database d;
     QString databaseName = d.getDatabaseName();


private slots:
    void logout_button_clicked_slot();
    void new_shipment_button_clicked_slot();
    void confirmation_button_clicked_slot();
    void account_button_clicked_slot();
    void more_button_clicked_slot();
    void dashboard_button_clicked_slot();
    void settings_button_clicked_slot();
    void report_button_clicked_slot();
    void advanced_button_clicked_slot();
    void ham_burger_button_clicked_slot();
    void messages_button_clicked_slot();
    void quit_button_clicked_slot();
    void on_menuDocumentation_triggered();

private:
    Ui::mainwin *ui;
     bool hamClicked;
     bool closeApp;

};
#endif // MAINWIN_H

</code></pre>
<p dir="auto">I remove all the pointers from here but there is no any gain in performance and is allocating same amount of memory</p>
<p dir="auto">Below file is mainwin.cpp</p>
<pre><code>#include "mainwin.h"
#include "ui_mainwin.h"

mainwin::mainwin(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::mainwin)
{
    ui-&gt;setupUi(this);
    ui-&gt;mainApp-&gt;setCurrentIndex(0);
    connections();
    hamClicked = true;
    ui-&gt;nav-&gt;setMinimumWidth(200);
    ui-&gt;nav-&gt;setMaximumWidth(200);

}

mainwin::~mainwin()
{
    delete ui;
}
void mainwin::connections(){
    navigation *nav_bar = ui-&gt;navigationBar;
    login *log = ui-&gt;loginPage;

    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),nav_bar,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(nav_bar,SIGNAL(logout_button_clicked_signal()),this,SLOT(logout_button_clicked_slot()));
    connect(nav_bar,SIGNAL(new_shipment_button_clicked_signal()),this,SLOT(new_shipment_button_clicked_slot()));
    connect(nav_bar,SIGNAL(confirmation_button_clicked_signal()),this,SLOT(confirmation_button_clicked_slot()));
    connect(nav_bar,SIGNAL(account_button_clicked_signal()),this,SLOT(account_button_clicked_slot()));
    connect(nav_bar,SIGNAL(more_button_clicked_signal()),this,SLOT(more_button_clicked_slot()));
    connect(nav_bar,SIGNAL(dashboard_button_clicked_signal()),this,SLOT(dashboard_button_clicked_slot()));
    connect(nav_bar,SIGNAL(settings_button_clicked_signal()),this,SLOT(settings_button_clicked_slot()));
    connect(nav_bar,SIGNAL(report_button_clicked_signal()),this,SLOT(report_button_clicked_slot()));
    connect(nav_bar,SIGNAL(advanced_button_clicked_signal()),this,SLOT(advanced_button_clicked_slot()));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;settings,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;messages,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(nav_bar,SIGNAL(ham_burger_button_clicked_signal()),this,SLOT(ham_burger_button_clicked_slot()));
    connect(nav_bar,SIGNAL(messages_button_clicked_signal()),this,SLOT(messages_button_clicked_slot()));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;newShipment,SLOT(login_button_clicked_slot(QString,QString,QString)));


}

void mainwin::logout_button_clicked_slot()
{
    // it is default page
    ui-&gt;mainApp-&gt;setCurrentIndex(0);
}

void mainwin::new_shipment_button_clicked_slot()
{
    ui-&gt;newShipment-&gt;clearValues();
    ui-&gt;newShipment-&gt;mainFunction();
    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;newShipment);

}

void mainwin::confirmation_button_clicked_slot()
{

    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;confirmation);
}

void mainwin::account_button_clicked_slot()
{

    ui-&gt;account-&gt;mainFunction();

    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;account);

}

void mainwin::more_button_clicked_slot()
{

    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;moreThings);

}

void mainwin::dashboard_button_clicked_slot()
{
    ui-&gt;dashboard-&gt;mainFunction();
    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;dashboard);


}

void mainwin::settings_button_clicked_slot()
{
    ui-&gt;dashboard-&gt;mainFunction();
    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;settings);

}

void mainwin::report_button_clicked_slot()
{
    ui-&gt;report-&gt;mainFunction();
    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;report);

}

void mainwin::advanced_button_clicked_slot()
{
    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;fullSettings);
}

void mainwin::messages_button_clicked_slot()
{

    ui-&gt;mainApp-&gt;setCurrentWidget(ui-&gt;messages);

}

void mainwin::ham_burger_button_clicked_slot()
{
    if(hamClicked){
        ui-&gt;nav-&gt;setMaximumWidth(60);
        ui-&gt;nav-&gt;setMinimumWidth(60);
        hamClicked = false;
    }else{
        ui-&gt;nav-&gt;setMinimumWidth(200);
        ui-&gt;nav-&gt;setMaximumWidth(200);
        hamClicked = true;
    }

}

void mainwin::quit_button_clicked_slot()
{
    closeApp = true;
    QCoreApplication::quit();
}

void mainwin::closeEvent (QCloseEvent *event)
{
    quitdialog closeApplication;
    connect(&amp;closeApplication,SIGNAL(quit_button_clicked_signal()),this,SLOT(quit_button_clicked_slot()));
    event-&gt;accept();
  
}
</code></pre>
<p dir="auto">In the main entrypoint of application I have just inserted css files using textstream from resources files<br />
database.h contains  all headers included<br />
That's it<br />
What may be the cause of it ?<br />
<em><strong>EDIT:</strong></em><br />
In addition to it when I add dialog at the closeEvent then it reports<br />
Insufficient Memory case 4</p>
]]></description><link>https://forum.qt.io/post/660965</link><guid isPermaLink="true">https://forum.qt.io/post/660965</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Sat, 22 May 2021 09:31:04 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 17:42:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thank-you">@<bdi>Thank-You</bdi></a> There is something fishy about either this tool (first time I see it) or your code. I write tools that use SQLite for everything, users leave those tools running for days sometimes and no extensive memory use have ever been detected. And we are talking about shitty windows budget office machines here.<br />
I'd like to see the code before I'll decide that Qt libraries have issues with memory leaks on that scale.</p>
<p dir="auto">EDIT:<br />
I started to google and found this post: <a href="https://www.francescmm.com/deleaker-review-on-gitqlient/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.francescmm.com/deleaker-review-on-gitqlient/</a><br />
Author also found leaks in Qt libraries and states:</p>
<pre><code>This scared me a lot, because I wasn’t expecting to get so many leaks to start with. But I was wrong: when I took the snapshots, the objects are attached to the life of their parent widget. So, for now I don’t need to worry!
</code></pre>
]]></description><link>https://forum.qt.io/post/660914</link><guid isPermaLink="true">https://forum.qt.io/post/660914</guid><dc:creator><![CDATA[artwaw]]></dc:creator><pubDate>Fri, 21 May 2021 17:42:48 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 16:57:33 GMT]]></title><description><![CDATA[<p dir="auto">If that is the case, simply select another version of Qt. I am not aware of Qt-5.12.8 has so many problems, especially in Qt5Core. Hard to imagine this.</p>
<p dir="auto">If you have the same problem with another version of Qt(for example 5.15.2), it is likely your code(not Qt) has problem.</p>
]]></description><link>https://forum.qt.io/post/660907</link><guid isPermaLink="true">https://forum.qt.io/post/660907</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Fri, 21 May 2021 16:57:33 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 15:52:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a>  and <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a><br />
There are many leaks in core dll than my application.<br />
I used deleaker for this to find<br />
What can I do for it??<br />
<img src="https://ddgobkiprc33d.cloudfront.net/88ed42cf-5d2b-4300-8a1e-0cf2dcca4a97.png" alt="87f74a18-ac16-486f-a084-d046e733330c-image.png" class=" img-fluid img-markdown" /><br />
Does it mean there are leaks in core dll too??</p>
]]></description><link>https://forum.qt.io/post/660899</link><guid isPermaLink="true">https://forum.qt.io/post/660899</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Fri, 21 May 2021 15:52:34 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 14:30:19 GMT]]></title><description><![CDATA[<ol>
<li>You add these 10 widgets to the stacked widget one after another to see which one causes memory problem.</li>
<li>if the memory usage goes up linearly, then checking one may be good enough. You use tools and ways to find that out.</li>
</ol>
]]></description><link>https://forum.qt.io/post/660883</link><guid isPermaLink="true">https://forum.qt.io/post/660883</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Fri, 21 May 2021 14:30:19 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 10:22:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a></p>
<pre><code>mainWin.h

#ifndef MAINWIN_H
#define MAINWIN_H

#include &lt;QMainWindow&gt;
#include&lt;QProgressBar&gt;
#pragma once
#include&lt;database.h&gt;
#include&lt;navigation.h&gt;
#include&lt;QString&gt;

#include&lt;QCloseEvent&gt;
#include&lt;quitdialog.h&gt;
//for this only
#include&lt;dashboardform.h&gt;
#include&lt;messagesform.h&gt;
#include&lt;newshipmentform.h&gt;
#include&lt;confirmationmodificationform.h&gt;
#include&lt;accountform.h&gt;
#include&lt;reportform.h&gt;
#include&lt;morethingsform.h&gt;
#include&lt;settingsform.h&gt;
#include&lt;fullsettingsform.h&gt;
#include&lt;currentlogin.h&gt;





QT_BEGIN_NAMESPACE
namespace Ui { class mainwin; }
QT_END_NAMESPACE

class mainwin : public QMainWindow
{
    Q_OBJECT

public:
    mainwin(QWidget *parent = nullptr);
    ~mainwin();
    void connections();
    navigation *nav_bar;
    void closeEvent(QCloseEvent *event);
    database d;
     QString databaseName = d.getDatabaseName();


private slots:
    void logout_button_clicked_slot();
    void new_shipment_button_clicked_slot();
    void confirmation_button_clicked_slot();
    void account_button_clicked_slot();
    void more_button_clicked_slot();
    void dashboard_button_clicked_slot();
    void settings_button_clicked_slot();
    void report_button_clicked_slot();
    void advanced_button_clicked_slot();
    void ham_burger_button_clicked_slot();
    void messages_button_clicked_slot();
    void quit_button_clicked_slot();
    void on_menuDocumentation_triggered();

private:
    Ui::mainwin *ui;
     bool hamClicked;
     messagesForm *messages ;
     dashboardForm * dashboard ;
     newShipmentForm *newShipment;
     confirmationModificationForm * confirmationModification ;
     accountForm * account  ;
     reportForm *report;
     moreThingsForm *moreThings;
     settingsForm * settings;
     fullSettingsForm *fullSettings;
     quitdialog closeApplication;
     bool closeApp;
    
};
#endif // MAINWIN_H

</code></pre>
<p dir="auto">this is mainwin.cpp</p>
<pre><code>#include "mainwin.h"
#include "ui_mainwin.h"
mainwin::mainwin(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::mainwin)
{
    ui-&gt;setupUi(this);
ui-&gt;mainApp-&gt;setCurrentIndex(0);

connections();

hamClicked = true;
ui-&gt;nav-&gt;setMinimumWidth(200);
ui-&gt;nav-&gt;setMaximumWidth(200);

messages = ui-&gt;messages;
dashboard = ui-&gt;dashboard;
newShipment = ui-&gt;newShipment;
confirmationModification = ui-&gt;confirmation;
account  = ui-&gt;account;
report = ui-&gt;report;
moreThings = ui-&gt;moreThings;
settings = ui-&gt;settings;
fullSettings = ui-&gt;fullSettings;
}

mainwin::~mainwin()
{
    delete ui;
}
void mainwin::connections(){
nav_bar = ui-&gt;navigationBar;

    login *log = ui-&gt;loginPage;
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),nav_bar,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(nav_bar,SIGNAL(logout_button_clicked_signal()),this,SLOT(logout_button_clicked_slot()));
    connect(nav_bar,SIGNAL(new_shipment_button_clicked_signal()),this,SLOT(new_shipment_button_clicked_slot()));
    connect(nav_bar,SIGNAL(confirmation_button_clicked_signal()),this,SLOT(confirmation_button_clicked_slot()));
    connect(nav_bar,SIGNAL(account_button_clicked_signal()),this,SLOT(account_button_clicked_slot()));
    connect(nav_bar,SIGNAL(more_button_clicked_signal()),this,SLOT(more_button_clicked_slot()));
    connect(nav_bar,SIGNAL(dashboard_button_clicked_signal()),this,SLOT(dashboard_button_clicked_slot()));
    connect(nav_bar,SIGNAL(settings_button_clicked_signal()),this,SLOT(settings_button_clicked_slot()));
    connect(nav_bar,SIGNAL(report_button_clicked_signal()),this,SLOT(report_button_clicked_slot()));
    connect(nav_bar,SIGNAL(advanced_button_clicked_signal()),this,SLOT(advanced_button_clicked_slot()));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;settings,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;messages,SLOT(login_button_clicked_slot(QString,QString,QString)));
    connect(nav_bar,SIGNAL(ham_burger_button_clicked_signal()),this,SLOT(ham_burger_button_clicked_slot()));
    connect(nav_bar,SIGNAL(messages_button_clicked_signal()),this,SLOT(messages_button_clicked_slot()));
    connect(log,SIGNAL(login_button_clicked_signal(QString , QString, QString)),ui-&gt;newShipment,SLOT(login_button_clicked_slot(QString,QString,QString)));


    connect(&amp;closeApplication,SIGNAL(quit_button_clicked_signal()),this,SLOT(quit_button_clicked_slot()));


}

void mainwin::logout_button_clicked_slot()
{
    // it is default page
    ui-&gt;mainApp-&gt;setCurrentIndex(0);
}

void mainwin::new_shipment_button_clicked_slot()
{
ui-&gt;newShipment-&gt;clearValues();
ui-&gt;newShipment-&gt;mainFunction();
//ui-&gt;mainApp-&gt;setCurrentIndex(1);
ui-&gt;mainApp-&gt;setCurrentWidget(newShipment);
 
}

void mainwin::confirmation_button_clicked_slot()
{
//ui-&gt;mainApp-&gt;setCurrentIndex(2);
ui-&gt;mainApp-&gt;setCurrentWidget(confirmationModification);
 

}

void mainwin::account_button_clicked_slot()
{
    ui-&gt;account-&gt;mainFunction();
//    ui-&gt;mainApp-&gt;setCurrentIndex(3);
    ui-&gt;mainApp-&gt;setCurrentWidget(account);
     
}

void mainwin::more_button_clicked_slot()
{

//    ui-&gt;mainApp-&gt;setCurrentIndex(4);
    ui-&gt;mainApp-&gt;setCurrentWidget(moreThings);
     
}

void mainwin::dashboard_button_clicked_slot()
{
    ui-&gt;dashboard-&gt;mainFunction();
//    ui-&gt;mainApp-&gt;setCurrentIndex(5);
    ui-&gt;mainApp-&gt;setCurrentWidget(dashboard);
     

}

void mainwin::settings_button_clicked_slot()
{
    ui-&gt;dashboard-&gt;mainFunction();
//    ui-&gt;mainApp-&gt;setCurrentIndex(6);
    ui-&gt;mainApp-&gt;setCurrentWidget(settings);
     
}

void mainwin::report_button_clicked_slot()
{
    ui-&gt;report-&gt;mainFunction();
//    ui-&gt;mainApp-&gt;setCurrentIndex(7);
    ui-&gt;mainApp-&gt;setCurrentWidget(report);

}

void mainwin::advanced_button_clicked_slot()
{
//    ui-&gt;mainApp-&gt;setCurrentIndex(8);
    ui-&gt;mainApp-&gt;setCurrentWidget(fullSettings);
}

void mainwin::messages_button_clicked_slot()
{
//    ui-&gt;mainApp-&gt;setCurrentIndex(9);
    ui-&gt;mainApp-&gt;setCurrentWidget(messages);

}

void mainwin::ham_burger_button_clicked_slot()
{
    if(hamClicked){
        ui-&gt;nav-&gt;setMaximumWidth(60);
       ui-&gt;nav-&gt;setMinimumWidth(60);
        hamClicked = false;
    }else{

        ui-&gt;nav-&gt;setMinimumWidth(200);
        ui-&gt;nav-&gt;setMaximumWidth(200);
        hamClicked = true;
    }

}

void mainwin::quit_button_clicked_slot()
{
    closeApp = true;
  QCoreApplication::quit();
}

void mainwin::closeEvent (QCloseEvent *event)
{
    event-&gt;accept();
/*connect with logic*/
 
}


</code></pre>
<p dir="auto">These are main two files<br />
All other are connected through this</p>
]]></description><link>https://forum.qt.io/post/660856</link><guid isPermaLink="true">https://forum.qt.io/post/660856</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Fri, 21 May 2021 10:22:10 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 09:33:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thank-you">@<bdi>Thank-You</bdi></a> There is nothing to solve. You set parent, so fp and sp will be deleted as soon as the parent is deleted. And these widgets for sure do not consume 1GB of RAM! Since I don't know what your app is doing I can't say what the problem is. You have to provide more information. What is your app actually doing? Did you try to disable parts of it until it does not consume so much RAM?</p>
]]></description><link>https://forum.qt.io/post/660844</link><guid isPermaLink="true">https://forum.qt.io/post/660844</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 21 May 2021 09:33:26 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 09:18:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a><br />
I am newbie at it 😂<br />
Can you solve this<br />
Stacked widgets with 10 forms like</p>
<pre><code>//in constructor 
{
private:
myFirstPage *fp = new myFirstPage(this);
mySecondPage *sp = new mySecondPage(this);
}

//when some button is clicked
void fClicked(){
myStackedWidget-&gt;setCurrentWidget(fp);
}
//again when another button is clicked
void sClicked(){
myStackedWidget-&gt;setCurrentWidget(sp);
}
</code></pre>
<p dir="auto">and so on<br />
I haven't used delete at all<br />
please share the technique to manage it</p>
]]></description><link>https://forum.qt.io/post/660841</link><guid isPermaLink="true">https://forum.qt.io/post/660841</guid><dc:creator><![CDATA[Thank You]]></dc:creator><pubDate>Fri, 21 May 2021 09:18:50 GMT</pubDate></item><item><title><![CDATA[Reply to Application takes huge amount of ram on Fri, 21 May 2021 08:26:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thank-you">@<bdi>Thank-You</bdi></a> said in <a href="/post/660837">Application takes huge amount of ram</a>:</p>
<blockquote>
<p dir="auto">What can I do to solve this problem??</p>
</blockquote>
<p dir="auto">Search for memory leaks in your app. On Linux you can use Valgrind for that.<br />
Also you can disable parts of your app until it gets better, then you know where exactly to look.</p>
]]></description><link>https://forum.qt.io/post/660838</link><guid isPermaLink="true">https://forum.qt.io/post/660838</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 21 May 2021 08:26:25 GMT</pubDate></item></channel></rss>