在运行时tabwidget添加标签 [英] add tab in a tabwidget on runtime

查看:141
本文介绍了在运行时tabwidget添加标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库,其中多个项目there.And我也有标签控件中拖卡可用现在我想添加包含的任何一个选项卡,从点击从数据库中的一些物品名称的标签标签窗口小部件。 假设我有TAB1 andtab2和数据库中的一个项目是有其名说TAB3现在,当我点击TAB2,我想补充TAB3在tabwidget .. plz帮助我.....

I have a data base in which multiple items are there.And also I have tab widget in which tow tabs are available now i want to add a tab of the name containing some items from database on the click of any one tab from the tab widget. Suppose i have tab1 andtab2 and in the database one item is there having name say tab3 now when i click on the tab2 ,i want to add tab3 in the tabwidget.. plz help me.....

推荐答案

您可以随时使用相同的标签添加 newTabSpec() / addTab()逻辑。您将需要使用 TabContentFactory ,虽然。 下面是证明这是一个示例应用程序。

You can add a tab at any time using the same newTabSpec()/addTab() logic you are using for the initial tabs. You will need to use a TabContentFactory, though. Here is a sample app demonstrating this.

这篇关于在运行时tabwidget添加标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆