QPushButton* m_button = new QPushButton();
Whenever i try to create a QPushButton
like this, it appears to be created in a new separate window. However, I want the Button to be created within the Mainwindow but I don't know how to do this (without using the Qt Designer).