| 621 | |
| 622 | |
| 623 | void UBApplication::insertSpaceToToolbarBeforeAction(QToolBar* toolbar, QAction* action, int width) |
| 624 | { |
| 625 | QWidget* spacer = new QWidget(); |
| 626 | |
| 627 | if (width >= 0){ |
| 628 | QHBoxLayout *layout = new QHBoxLayout(); |
| 629 | layout->addSpacing(width); |
| 630 | spacer->setLayout(layout); |
| 631 | } |
| 632 | else |
| 633 | spacer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); |
| 634 | |
| 635 | toolbar->insertWidget(action, spacer); |
| 636 | } |
| 637 | |
| 638 | |
| 639 | bool UBApplication::eventFilter(QObject *obj, QEvent *event) |
no outgoing calls
no test coverage detected