I want to build interface which looks like this:
There are panels QDockPanel to the sides. The main question is how to make main viewport (which is dark in the screen). When I resize, for example, right panel, it also changes the size. Could I use QDockPanel with layouts to achieve this?
Use QMainWindow. It does exactly that. The “main viewport” is called a central widget in the QMainWindow.