Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序中有一个 tabWidget,我想在标题附近添加图标。我该怎么做?
谢谢!
使用该int QTabWidget::addTab ( QWidget * page, const QIcon & icon, const QString & label )功能。第二个参数允许为选项卡指定一个 QIcon。另请参阅void QTabBar::setTabIcon ( int index, const QIcon & icon )。
int QTabWidget::addTab ( QWidget * page, const QIcon & icon, const QString & label )
void QTabBar::setTabIcon ( int index, const QIcon & icon )