[tabs] + [header sections] Cannot add Tabs programmatically
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Shorts App |
Confirmed
|
High
|
Unassigned | ||
Ubuntu UI Toolkit |
Fix Released
|
Medium
|
Zsombor Egri | ||
Ubuntu UX |
Fix Committed
|
Medium
|
Olga Kemmet | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
There seems to be no easy way to add a Tab to Tabs programmatically.
I would be nice to be able add, remove and edit Tabs dynamically. So far I haven't found a way to do this.
I have made an Android style ViewPager based on ListView. It is quite easy to update the pages with ListModel methods.
------------ UX Comment -----------
Tabs component is not deprecated from UITK point of view. Design uses slightly different naming than UITK for components they design, we call "Tabs" now "Header Sections". This is a bar which sits below the main header.
An other option to add "tabs" to your UI, allowing user to navigate through different sections of the app, is a navigation drawer on the left hand side of the header.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
- Tim Peeters: Approve
- Zsombor Egri: Approve
-
Diff: 710 lines (+468/-46)8 files modifiedcomponents.api (+6/-1)
modules/Ubuntu/Components/Tab.qml (+24/-0)
modules/Ubuntu/Components/TabBar.qml (+11/-0)
modules/Ubuntu/Components/Tabs.qml (+195/-37)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+5/-4)
tests/resources/navigation/Tabs.qml (+51/-4)
tests/unit_x11/tst_components/ExternalTab.qml (+21/-0)
tests/unit_x11/tst_components/tst_tabs.qml (+155/-0)
- PS Jenkins bot: Approve (continuous-integration)
- Tim Peeters: Approve
- Cris Dywan: Pending (provided moveitembefore docs are fixed) requested
-
Diff: 865 lines (+586/-31)10 files modifiedCHANGES (+1/-0)
components.api (+6/-1)
modules/Ubuntu/Components/Tab.qml (+0/-7)
modules/Ubuntu/Components/Tabs.qml (+292/-20)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+9/-2)
modules/Ubuntu/Components/plugin/quickutils.cpp (+15/-0)
modules/Ubuntu/Components/plugin/quickutils.h (+1/-0)
tests/resources/navigation/Tabs.qml (+90/-1)
tests/unit_x11/tst_components/ExternalTab.qml (+21/-0)
tests/unit_x11/tst_components/tst_tabs.qml (+151/-0)
- PS Jenkins bot: Approve (continuous-integration)
- Tim Peeters: Approve
- Cris Dywan: Approve (provided moveitembefore docs are fixed)
-
Diff: 1137 lines (+767/-49)14 files modifiedCHANGES (+1/-0)
components.api (+8/-1)
modules/Ubuntu/Components/Tab.qml (+0/-7)
modules/Ubuntu/Components/Tabs.qml (+292/-20)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+9/-2)
modules/Ubuntu/Components/plugin/quickutils.cpp (+15/-0)
modules/Ubuntu/Components/plugin/quickutils.h (+1/-0)
modules/Ubuntu/Test/UbuntuTestCase.qml (+69/-1)
modules/Ubuntu/Test/deployment.pri (+6/-1)
tests/resources/navigation/Tabs.qml (+90/-1)
tests/unit/runtest.sh (+1/-1)
tests/unit_x11/tst_components/ExternalTab.qml (+21/-0)
tests/unit_x11/tst_components/tst_tabs.qml (+151/-0)
tests/unit_x11/tst_test/tst_ubuntutestcase.qml (+103/-15)
description: | updated |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Tim Peeters (tpeeters) |
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
summary: |
- Cannot add Tabs programmatically + [tabs] Cannot add Tabs programmatically |
Changed in ubuntu-ui-toolkit: | |
importance: | Medium → Critical |
Changed in ubuntu-ux: | |
status: | New → Confirmed |
Changed in ubuntu-ui-toolkit: | |
status: | Incomplete → Confirmed |
Changed in ubuntu-ui-toolkit: | |
importance: | Critical → High |
Changed in ubuntu-ux: | |
assignee: | nobody → Calum Pringle (calumpringle) |
tags: | added: tabs |
Changed in ubuntu-rssreader-app: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
Changed in ubuntu-ux: | |
assignee: | Calum Pringle (calumpringle) → Katie Taylor (katie-t) |
Changed in ubuntu-ui-toolkit: | |
importance: | High → Critical |
Changed in ubuntu-ui-toolkit: | |
assignee: | Tim Peeters (tpeeters) → Zsombor Egri (zsombi) |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Confirmed |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → In Progress |
milestone: | none → april-2014 |
Changed in ubuntu-ux: | |
assignee: | Katie Taylor (katie-t) → Jouni Helminen (jounihelminen) |
Changed in ubuntu-ui-toolkit: | |
milestone: | june-2014 → september-2014 |
Changed in ubuntu-ux: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
Changed in ubuntu-ui-toolkit: | |
importance: | High → Medium |
Changed in ubuntu-ux: | |
assignee: | Jouni Helminen (jounihelminen) → nobody |
assignee: | nobody → Giorgio Venturi (giorgio-venturi) |
description: | updated |
Changed in ubuntu-ux: | |
status: | Triaged → Won't Fix |
Changed in ubuntu-ux: | |
assignee: | Giorgio Venturi (giorgio-venturi) → Olga Kemmet (olga-kemmet) |
status: | Won't Fix → Fix Committed |
summary: |
- [tabs] Cannot add Tabs programmatically + [tabs] + [header sections] Cannot add Tabs programmatically |
description: | updated |
This is a limitation in the VisualItemModel upon which Tabs is based and will need to be resolved with a feature request upstream within Qt. VisualItemModel does not currently have the ability to append, delete etc. pastebin. com/dmyPkyyX (see the fillTabs function)
The only workaround I have found so far is to create the whole Tabs container and all tabs in a function using Qt.createQmlObject. Horribly hackey and the string gets unmanageable very quickly but does work.
My current working code can be seen here: http://