Q: How to resize content according to mainindow(responsive like app) in qt? I want to make responsive app where all the content get resize according to MainWindow as I increase/decrease its size (responsive webpage like interface).
please consider my problem..

A: You have to add a layout to your widget or main window. All widgets added to this layout will resize according to their size policy.
1. Create the layout
In the QtCreator/designer
Create a new widget or window from the template. Afterwards drag a layout from the left into your widget/window.
Then you have to tell the layout to use all available space in the widget/window (popup menu on the right).

All widgets you add to this layout will be resized by the layout, which fills the whole space in the widget/window.
Programmatically
main.cpp
int main(int argc, char **argv)
{
   QApplication app(argc, argv);
   MyMainWindow *win = new MyMainWindow();
   win->show();
   return app.exec();;
}

MyMainWindow.h
class MyMainWindow: public QMainWindow {

public:
   MyMainWindow(QMainWindow *parent = Q_NULLPTR);

};

MyMainWondow.cpp
MyMainWindow::MyMainWindow(QMainWindow *parent): QMainWindow(parent) {
   // replace the central widget to set our own layout
   QWidget *centralWidget = new QWidget(this);

   QVBoxLayout *verticalLayout = new QVBoxLayout(centralWidget);
   centralWidget->setLayout(verticalLayout);
   setCentralWidget(centralWidget);

   // add widgets here, for testing a table, that uses all available space
   verticalLayout->addWidget(new QTableView);
}

2. Adjust size policy
For custom widgets inside a layout you may have to set the size policy to tell the widget/layout how to resize the widget. See QSizePolicy and setSizePolicy. All Qt Widgets should have reasonable size policies by default (e.g. tables expand, while buttons do not).
Example:
To make a widget take as much space as possible it needs to have the QSizePolicy::Expanding set.
This property can also be set in the QtDesigner/Creator.
// set for horizontal and vertical at the same time
myWidget->setSizePolicy(QSizePolicy::Expanding);

// set different values for horizontal and vertical
myWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
verticalLayout->addWidget(myWidget);

