If I want to have SDI application, does it mean that all I have to do is the following?:
No. All that that code gets you (assuming MainWindow is derived from QMainWindow and you have placed it in a properly declared main() function with a QApplication and a call to QApplication:: exec()) is an empty QMainWindow instance on screen. It has empty menus, toolbar, and status bar and nothing as a central widget.

Qt is not MFC. It has no general concept of a "document" class; if you want to have a central place to store information about your app, you can invent whatever you want as a "document" class to hold that information. If you derive it from QObject, you can declare signals and slots for it so it can communicate with your Qt GUI just like any other QObject-based Qt class, or you can make it a plain old C++ class with an instance owned by MainWindow. In that case, any "communication" is done through signals and slots you declare for MainWindow, and MainWindow reads and writes to the document instance through its C++ methods.

Here is a basic QMainWindow "SDI" tutorial. In this example, the "central widget" is not a stand-alone QWidget-based class (i.e. not a named class derived from QWidget, just plain old QWidget used as a container), but is built using Qt Designer directly into the QMainWindow-based "Notepad" class. This is simple, but many real Qt apps create a separate class with its own .cpp, .h. and .ui files and set an instance of that as the main window's central widget. It's cleaner that way.

Also in this tutorial, the QTextEdit class serves as both a GUI widget for editing the "document" as well as the "document" itself since it internally creates a QTextDocument instance and uses it to store what the user is typing. This is fine if all your app needs to store is text, but most real apps need more than that.