When I click on Page 3 what should happen?
Page 3 is visible too.
Is the number of open panels limited to two?
No, every page can be visible.
What happens if the panels + buttons will no longer fit in the available height?
The contents could be scrolled.
If you change setCurrentIndex() from the ToolBox example, the ToolBox can do all these things
void ToolBox::setCurrentIndex(int index)
{
Page *c = page(index);
if (!c){
return;
}
if (currentPage) {
currentPage->button->setSelected(false);
}
c->button->setSelected(true);
if( c->sv->isVisible() ){
c->sv->hide();
}else{
c->sv->show();
}
currentPage = c;
updateTabs();
emit currentChanged(index);
}
void ToolBox::setCurrentIndex(int index)
{
Page *c = page(index);
if (!c){
return;
}
if (currentPage) {
currentPage->button->setSelected(false);
}
c->button->setSelected(true);
if( c->sv->isVisible() ){
c->sv->hide();
}else{
c->sv->show();
}
currentPage = c;
updateTabs();
emit currentChanged(index);
}
To copy to clipboard, switch view to plain text mode
Why should be the UI interaction annoying?
Bookmarks