I am a beginner in Qt
and I want to make three QDockWidget
s appear on the screen in the left, right and bottom. Here's the code :
.h file
QDockWidget *dock1 = new QDockWidget("Left dock");
QDockWidget *dock2 = new QDockWidget("Right dock");
QDockWidget *dock3 = new QDockWidget("Bottom dock");
.cpp file
dock1->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
dock2->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
dock3->setAllowedAreas(Qt::BottomDockWidgetArea);
this->addDockWidget(Qt::LeftDockWidgetArea, dock1);
this->addDockWidget(Qt::RightDockWidgetArea, dock2);
this->addDockWidget(Qt::BottomDockWidgetArea, dock3);
This is all I added to the files (I didn't include the whole file because most of them are just default code). And this is what I get :
Is this normal ? And for some reason I can't resize the docks using the handle bar between the bottom and two upper docks. This is what I thought was gonna happen :
Forget the red line. But in my mind, I thought it's gonna look more like the latter picture (With the white panel attached to it and resizable between 3rd and the other docks).
It this behaviour normal. Or did I mess something up. Somebody please help me.
Btw : When creating the project p, I had "generate form" disabled. Wonder if that affects anything.