Hi, this is my code now:
Q_CHECK_PTR(m_pToolbox);
Q_CHECK_PTR(m_pTabSifrant);
Q_CHECK_PTR(m_pTabVnos);
Q_CHECK_PTR(m_pTabIsci);
Q_CHECK_PTR(m_pTabNatisni);
//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 main widget
m_pMainLayout->addWidget(m_pToolbox);
//set stretch factor to 1
m_pMainLayout->setStretchFactor(m_pToolbox,1);
//add blank widget to main widget --> we'll have to change that to insert a widget we'll use. This is just for testing purposes
m_pMainLayout->addWidget(test);
m_pMainLayout->setStretchFactor(test,3);
m_pToolbox = new QToolBox();
Q_CHECK_PTR(m_pToolbox);
m_pTabSifrant = new QTabWidget();
Q_CHECK_PTR(m_pTabSifrant);
m_pTabVnos = new QTabWidget();
Q_CHECK_PTR(m_pTabVnos);
m_pTabIsci = new QTabWidget();
Q_CHECK_PTR(m_pTabIsci);
m_pTabNatisni = new QTabWidget();
Q_CHECK_PTR(m_pTabNatisni);
//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 main widget
m_pMainLayout->addWidget(m_pToolbox);
//set stretch factor to 1
m_pMainLayout->setStretchFactor(m_pToolbox,1);
//add blank widget to main widget --> we'll have to change that to insert a widget we'll use. This is just for testing purposes
QWidget *test = new QWidget();
m_pMainLayout->addWidget(test);
m_pMainLayout->setStretchFactor(test,3);
To copy to clipboard, switch view to plain text mode
Now I want a way to resize and hide the QToolBox, like in kpdf program. There's a little sidebar (where the slides are in minimal form) and you can resize it and hide it. When it's hidden you can also drag it on the right again to show it..
How can I do that.
Bookmarks