src/document.cpp

changeset 163
36ea1a8aee33
parent 153
2f79053c2e9a
child 169
6da096930534
equal deleted inserted replaced
162:3ebe1a0ca818 163:36ea1a8aee33
165 { 165 {
166 QAction* action = new QAction{toolInstance->name(), this}; 166 QAction* action = new QAction{toolInstance->name(), this};
167 action->setCheckable(true); 167 action->setCheckable(true);
168 this->toolActions[toolInstance] = action; 168 this->toolActions[toolInstance] = action;
169 action->setToolTip(toolInstance->toolTip()); 169 action->setToolTip(toolInstance->toolTip());
170 action->setIcon(QPixmap{toolInstance->iconName()});
170 connect(action, &QAction::triggered, this, &Document::toolActionTriggered); 171 connect(action, &QAction::triggered, this, &Document::toolActionTriggered);
171 this->toolsBar->addAction(action); 172 this->toolsBar->addAction(action);
172 QWidget* const widget = toolInstance->toolWidget(); 173 QWidget* const widget = toolInstance->toolWidget();
173 if (widget) 174 if (widget)
174 { 175 {

mercurial