From: Joel Holdsworth Date: Sun, 12 Jan 2014 20:12:40 +0000 (+0000) Subject: Removed QToolBar from DecoderGroupBox X-Git-Tag: pulseview-0.2.0~148 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=37c1812204088774f369fc934e3971a82d454717;p=pulseview.git Removed QToolBar from DecoderGroupBox --- diff --git a/pv/widgets/decodergroupbox.cpp b/pv/widgets/decodergroupbox.cpp index 805a7690..58874d38 100644 --- a/pv/widgets/decodergroupbox.cpp +++ b/pv/widgets/decodergroupbox.cpp @@ -20,10 +20,9 @@ #include "decodergroupbox.h" -#include #include #include -#include +#include #include #include @@ -42,15 +41,16 @@ DecoderGroupBox::DecoderGroupBox(QString title, QWidget *parent) : 0, 0); _layout->setColumnStretch(0, 1); - QToolBar *const toolbar = new QToolBar; - toolbar->setIconSize(QSize(16, 16)); - _layout->addWidget(toolbar, 0, 1); + QHBoxLayout *const toolbar = new QHBoxLayout; + _layout->addLayout(toolbar, 0, 1); - QAction *const delete_action = new QAction( - QIcon(":/icons/decoder-delete.svg"), tr("Delete"), this); - connect(delete_action, SIGNAL(triggered()), + QPushButton *const delete_button = new QPushButton( + QIcon(":/icons/decoder-delete.svg"), QString(), this); + delete_button->setFlat(true); + delete_button->setIconSize(QSize(16, 16)); + connect(delete_button, SIGNAL(clicked()), this, SIGNAL(delete_decoder())); - toolbar->addAction(delete_action); + toolbar->addWidget(delete_button); } void DecoderGroupBox::add_layout(QLayout *layout)