Q_CHECK_PTR(splitter);
//tabs
m_pToolbox->addItem(m_pTabSifrant,trUtf8("Šifranti"));
m_pToolbox->addItem(m_pTabVnos,trUtf8("Vnos"));
m_pToolbox->addItem(m_pTabIsci,trUtf8("Iskanje"));
m_pToolbox->addItem(m_pTabNatisni,trUtf8("Tiskanje"));
//add QToolBox to the splitter widget
splitter->insertWidget(0,m_pToolbox);
//add blank widget to splitter widget --> we'll have to change that to insert a widget we'll use. This is just for testing purposes
splitter->insertWidget(1,test);
//sets whether the child at index is collapsible to collapse
splitter->setCollapsible(0,true);
splitter->setCollapsible(1,false);
//set's the stretch factor to specific widget
splitter->setStretchFactor(0,1);
splitter->setStretchFactor(1,3);
//sets the size of the 2 widgets in QSplitter
QList<int> m_SizeList;
m_SizeList << 100 << 500;
splitter->setSizes(m_SizeList);
//add QSplitter to the main widget
m_pMainLayout->addWidget(splitter);
splitter = new QSplitter();
Q_CHECK_PTR(splitter);
//tabs
m_pToolbox->addItem(m_pTabSifrant,trUtf8("Šifranti"));
m_pToolbox->addItem(m_pTabVnos,trUtf8("Vnos"));
m_pToolbox->addItem(m_pTabIsci,trUtf8("Iskanje"));
m_pToolbox->addItem(m_pTabNatisni,trUtf8("Tiskanje"));
//add QToolBox to the splitter widget
splitter->insertWidget(0,m_pToolbox);
//add blank widget to splitter widget --> we'll have to change that to insert a widget we'll use. This is just for testing purposes
QWidget *test = new QWidget();
splitter->insertWidget(1,test);
//sets whether the child at index is collapsible to collapse
splitter->setCollapsible(0,true);
splitter->setCollapsible(1,false);
//set's the stretch factor to specific widget
splitter->setStretchFactor(0,1);
splitter->setStretchFactor(1,3);
//sets the size of the 2 widgets in QSplitter
QList<int> m_SizeList;
m_SizeList << 100 << 500;
splitter->setSizes(m_SizeList);
//add QSplitter to the main widget
m_pMainLayout->addWidget(splitter);
To copy to clipboard, switch view to plain text mode
Bookmarks