- edgesLayout->setRowStretch(2, 5);
- edgesLayout->setColumnStretch(1, 5);
-
- myListWidget->setMinimumWidth(300);
- myInfoLabel->setMinimumWidth(300);
- myInfoLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
+ if ( myListWidget )
+ {
+ int row = 0;
+ layout->addWidget(myListWidget, row, 0, 3+toShowActivateBtn, 3);
+ if ( toShowActivateBtn )
+ layout->addWidget( myActivateButton, row++, 3 );
+ else
+ myActivateButton->hide();
+ layout->addWidget(myAddButton, row, 3);
+ layout->addWidget(myRemoveButton, ++row, 3);
+ ++row;
+ layout->addWidget(myInfoLabel, ++row, 0, 1, 3);
+ layout->addWidget(myPrevButton, ++row, 0);
+ layout->addWidget(myNextButton, row, 2);
+
+ layout->setRowStretch(row-2, 5);
+ layout->setColumnStretch(1, 5);
+ }
+ else // show only Prev and Next buttons
+ {
+ layout->addWidget(myInfoLabel, 0, 0, 1, 2);
+ layout->addWidget(myPrevButton, 1, 0);
+ layout->addWidget(myNextButton, 1, 1);
+ }
+ //myInfoLabel->setMinimumWidth(300);
+ //myInfoLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);