Cannot hide individual tabs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
It seems setting the 'visible' property on an individual tab does not work: the tab and its contents are not hidden as expected:
MainView {
Tabs {
Tab {
title: "tab 1"
page: Text {
}
Tab {
title: "tab 2"
page: Text {
}
}
}
In my use case, I have a Debug tab I use to display debug messages when running on a device. I wanted to make this tab's visibility dependent on a debugMode variable, but as the 'visible' property on individual tabs is always 'true' regardless of what I set it to, I cannot hide the Debug tab.
summary: |
- Cannot hide tabs + Cannot hide individual tabs |
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: tabs |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Tim Peeters (tpeeters) |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → Won't Fix |
Here is a simple hack that I've been using that seems to work well:
Tab { eNode: !show
property bool show: false //true to show or false to hide
__isPageTre
onShowChanged: {
__isPageTreeNo de = show
parent. updateTabList( )
}
}