Why setMinimumSize does not work for me??!!
Here is code:
void qKobilica
::addShortcutWidget(QToolBox* pToolBox
) {
m_pMenuShortcutWidget
=new QDockWidget(trUtf8
("Hitri meni"),
this);
Q_CHECK_PTR(m_pMenuShortcutWidget); // checks widget creation
/*
m_pMenuShortcutWidgetSA=new QScrollArea(m_pMenuShortcutWidget);
Q_CHECK_PTR(m_pMenuShortcutWidgetSA); // checks scroll area creation
m_pMenuShortcutWidgetSA->setBackgroundRole(QPalette::Dark);
m_pMenuShortcutWidgetSA->setWidget(m_pMenuShortcutWidget);
m_pMenuShortcutWidgetSA->setMinimumSize(0, 0);
m_pMenuShortcutWidgetSA->setMaximumSize(1500, 1000);
m_pMenuShortcutWidgetSA->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_pMenuShortcutWidgetSA->ensureWidgetVisible(m_pMenuShortcutWidget);
*/
m_pMenuShortcutWidget->setMinimumSize(200, 600);
//m_pMenuShortcutWidget->setMaximumSize(1500, 100);
m_pMenuShortcutWidget
->setFeatures
(QDockWidget::NoDockWidgetFeatures |
m_pMenuShortcutWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); // sets allowed docked area
//m_pMenuShortcutWidget->setWidget(m_pMenuShortcutWidgetSA);
m_pMenuShortcutWidget->setWidget(pToolBox);
addDockWidget(Qt::LeftDockWidgetArea, m_pMenuShortcutWidget); // places widget
}
void qKobilica::addShortcutWidget(QToolBox* pToolBox)
{
m_pMenuShortcutWidget=new QDockWidget(trUtf8("Hitri meni"), this);
Q_CHECK_PTR(m_pMenuShortcutWidget); // checks widget creation
/*
m_pMenuShortcutWidgetSA=new QScrollArea(m_pMenuShortcutWidget);
Q_CHECK_PTR(m_pMenuShortcutWidgetSA); // checks scroll area creation
m_pMenuShortcutWidgetSA->setBackgroundRole(QPalette::Dark);
m_pMenuShortcutWidgetSA->setWidget(m_pMenuShortcutWidget);
m_pMenuShortcutWidgetSA->setMinimumSize(0, 0);
m_pMenuShortcutWidgetSA->setMaximumSize(1500, 1000);
m_pMenuShortcutWidgetSA->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_pMenuShortcutWidgetSA->ensureWidgetVisible(m_pMenuShortcutWidget);
*/
m_pMenuShortcutWidget->setMinimumSize(200, 600);
//m_pMenuShortcutWidget->setMaximumSize(1500, 100);
m_pMenuShortcutWidget->setFeatures(QDockWidget::NoDockWidgetFeatures |
QDockWidget::DockWidgetClosable |
QDockWidget::DockWidgetMovable |
QDockWidget::DockWidgetFloatable);
m_pMenuShortcutWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); // sets allowed docked area
//m_pMenuShortcutWidget->setWidget(m_pMenuShortcutWidgetSA);
m_pMenuShortcutWidget->setWidget(pToolBox);
addDockWidget(Qt::LeftDockWidgetArea, m_pMenuShortcutWidget); // places widget
}
To copy to clipboard, switch view to plain text mode
Bookmarks