#pragma once #include #include #include class ButtonRow:public QWidget { Q_OBJECT public: ButtonRow(QWidget *parent=0, QBoxLayout::Direction dir=QBoxLayout::LeftToRight); void add(QAbstractButton *btn) { _layout.addWidget(btn); } protected: QBoxLayout _layout; };