I am working on a Qt Desktop project, each Ui page contains almost 60 widgets inform of labels, textedit, Qpushbutton etc, Stylesheet is being applied to all the widgets like
QString styleSheetLabel = QString("QLabel{font-size: %1pt;}").arg(fontSize);
ui->label->setStyleSheet(styleSheetLabel);
When I am opening a new page my Memory consumption almost increases by 15 MB, and does not comeback to previous value after closing the page.After looking for the issue found that commenting the code related to stylesheet the consumption was only increasing by 0.5 to 1 MB. How can I fix this issue.
I have already tried following but none worked for me.
https://forum.qt.io/topic/74686/remove-applied-stylesheet-in-qt
https://www.qtcentre.org/threads/38841-How-to-reset-a-stylesheet-to-default