Resizing the Panel Window
Unsolved
General and Desktop
-
Hi,
Please post your code as text and not as an image. This makes it hard to read while also not allowing it to be copy-pasted for tests.
As for your issue, you seem to have a grid layout with three columns and you put widgets in column 0 and 2.
If you want the widgets in column 0 to go next to the widgets in column 2 then you have to set the span accordingly.
-
Sorry, here is the code in text format.
setObjectName(title); mspInstance = this; setFeatures( QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable); setFocusPolicy(Qt::StrongFocus); QPalette backgroundColor(palette()); backgroundColor.setColor(QPalette::Background, Qt::black); QWidget *pBaseWidget = new QWidget; QGridLayout *pLayout = new QGridLayout; pBaseWidget->setAutoFillBackground(true); pBaseWidget->setPalette(backgroundColor); pBaseWidget->setLayout(pLayout); setWidget(pBaseWidget); pBaseWidget->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding)); pLayout->addWidget(mpDateGroup(), 0, 0, 1, 2); pLayout->addWidget(mpCheckboxGroup(), 1, 0, 1, 2); pLayout->addWidget(mpTransmitterGroup(), 2, 0); pLayout->addWidget(mpReceiverGroup(), 2, 1); pLayout->addWidget(mpDropDownMenuGroup(), 3, 0, 1, 2); QLabel *pTitle = new QLabel("Recommended Schedule"); QFont myTitleFont("times", 24); pTitle->setFont(myTitleFont); pTitle->setAlignment(Qt::AlignCenter); pTitle->setStyleSheet("background:lightBlue"); pLayout->addWidget(pTitle, 4, 0, 1, 2); pLayout->addWidget(mpProgressBarGroup(), 5, 0, 1, 2); pLayout->addWidget(mpRequirementGroup(), 6, 0, 1, 2);
-
Do not forget to add the coding tags to make it readable.
This code does not seem to include the whole of your interface.