Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Add/remove tabs dynamically

$
0
0
Hi, addTab: “ReferenceError: myComponent is not defined” The second argument of addTab [qt-project.org] takes a component, so first you need to create a component [qt-project.org] for e.g     Component {         id: comp         MyComponent{         }     } and then pass the component id to your addTab function. removeTab: “RangeError: Maximum call stack size exceeded.” Change your removeTab name to something else as it is going into recursion and hence the error. For eg. Change  function removeTab(){             tb.removeTab(1)         } to  function deleteTab(){             tb.removeTab(0)         } And yes remove the tab at correct index.

Viewing all articles
Browse latest Browse all 4972

Trending Articles