PDA

View Full Version : QTabWidget multiple tab show problem!



bangqianchen
13th January 2010, 09:58
I am add many tabs on a dialog, however, the tab arrow had overlap with tab text. the fellowing is part of my code.


//CTabPageDescInfomation is a subclass of QWidget.
m_pTabWidget = new QTabWidget(this);
m_pTabPage[Tab_Page_Basic] = new CTabPageDescInfomation(Tab_Page_Basic,m_nDlgType,c hildFrm(),this);
m_pTabWidget->addTab(m_pTabPage[Tab_Page_Basic],g_mapPages[Tab_Page_Basic]);
m_pTabPage[Tab_Page_Botany] = new CTabPageDescInfomation(Tab_Page_Botany,m_nDlgType, childFrm(),this);
m_pTabWidget->addTab(m_pTabPage[Tab_Page_Botany],g_mapPages[Tab_Page_Botany]);
m_pTabPage[Tab_Page_Agronomy] = new CTabPageDescInfomation(Tab_Page_Agronomy,m_nDlgTyp e,childFrm(),this);
m_pTabWidget->addTab(m_pTabPage[Tab_Page_Agronomy],g_mapPages[Tab_Page_Agronomy]);
//......
connect(m_pTabWidget,SIGNAL(currentChanged(int)),t his,SLOT(slot_tabSelChanged(int)));
pH->addWidget(m_pTabWidget);

When run the program , it shows as the picture below, Does somebody encounter a similar problem?

jpn
13th January 2010, 11:54
Are you using the latest Qt version?

bangqianchen
14th January 2010, 01:09
Yes, I am using Qt 4.6.0 + vs2008 on window platform.