# HG changeset patch # User František Kučera # Date 1538218684 -7200 # Node ID 547a7c5681a5b72f0f67ffb666fece1738e9eb7c # Parent 0a6a88e4e48fa35fe2c1fedaadf82242d8fa3387 tab icons diff -r 0a6a88e4e48f -r 547a7c5681a5 src/RelpipeChartMainWindow.cpp --- a/src/RelpipeChartMainWindow.cpp Sat Sep 29 12:48:16 2018 +0200 +++ b/src/RelpipeChartMainWindow.cpp Sat Sep 29 12:58:04 2018 +0200 @@ -12,7 +12,8 @@ RelpipeChartMainWindow::RelpipeChartMainWindow() { widget.setupUi(this); - tabs->addTab(new QPushButton("here will be options", tabs), "Options"); + int optionsIndex = tabs->addTab(new QPushButton("here will be options", tabs), "Options"); + tabs->setTabIcon(optionsIndex, QIcon::fromTheme("configure")); statusBar()->addWidget(new QLabel("Loading relations...", widget.statusbar)); @@ -43,8 +44,9 @@ QSplitter* splitter = new QSplitter(Qt::Orientation::Vertical, tabs); splitter->addWidget(new QPushButton("here will be the chart", splitter)); splitter->addWidget(new QPushButton("here will be the table", splitter)); - tabs->addTab(splitter, QString::fromWCharArray(name.c_str())); - if (tabs->count() == 2) tabs->setCurrentIndex(1); // switch to the first relation (first tab is Options tab) + int index = tabs->addTab(splitter, QString::fromWCharArray(name.c_str())); + if (tabs->count() == 2) tabs->setCurrentIndex(index); // switch to the first relation (first tab is Options tab) + tabs->setTabIcon(index, QIcon::fromTheme("application-vnd.oasis.opendocument.spreadsheet")); } void RelpipeChartMainWindow::attribute(const string_t& value) {