I added a QToolButton onto a QToolBar. But the first button always has the dashed line ractangle around it. Even if I click other button, the first button still has that rectangle. I don't know how to remove it. Here I set each QToolButton as following code:
Qt Code:
  1. action = new QAction(this);
  2. action->setIcon(icon);
  3. action->setCheckable(true);
  4. actionGroup->addAction(action);
To copy to clipboard, switch view to plain text mode 
And then I create the QToolButton:
Qt Code:
  1. QToolButton * createToolButton(QAction *action)
  2. {
  3. QToolButton *button = new QToolButton;
  4. button->setDefaultAction(action);
  5. button->setAutoRaise(true);
  6. return button;
  7. }
  8. // ...
  9. QToolButton *button = createToolButton(action);
  10. layout->addWidget(button , 0, 0, 1, 1);
  11. // other butttons
To copy to clipboard, switch view to plain text mode 
Please help me. Thank you all!