I have some QWidget class which ui files are separate from QMainWindow ui file.
how to add or replace current QWidet which is glued to QMainWindow into other QWidget from different class and ui files on the same QMainWindow ?
I have some QWidget class which ui files are separate from QMainWindow ui file.
how to add or replace current QWidet which is glued to QMainWindow into other QWidget from different class and ui files on the same QMainWindow ?
If I understand you correctly, you are currently displaying one widget and upon an action, you want to hide that widget and display another one in its place.
If this is correct, you might want to look at QStackedLayout.
Add your widget headers (note that you have to generate the headers from ui and inherit) into promoted widgets in your QMainWindow.ui.
Then, You just have to insert a QWidget,QFrame, ... depending on the base class of your widget, and right click on it and select your custom widget from Promote to.. Submenu.
Heres a link to QT manual