Changeset - 09bed53b52c3
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-09-30 11:52:32
hy@ozderya.net
set a minimum width for toolbar portlist combobox
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
portcontrol.cpp
Show inline comments
 
@@ -23,12 +23,14 @@
 
#include <QSerialPortInfo>
 
#include <QKeySequence>
 
#include <QLabel>
 
#include <QtDebug>
 
#include "utils.h"
 

	
 
#define TBPORTLIST_MINWIDTH (200)
 

	
 
PortControl::PortControl(QSerialPort* port, QWidget* parent) :
 
    QWidget(parent),
 
    ui(new Ui::PortControl),
 
    portToolBar("Port"),
 
    openAction("Open", this)
 
{
 
@@ -44,12 +46,13 @@ PortControl::PortControl(QSerialPort* po
 
                     this, &PortControl::openActionTriggered);
 

	
 
    portToolBar.addWidget(&tbPortList);
 
    portToolBar.addAction(&openAction);
 

	
 
    // setup port selection widgets
 
    tbPortList.setMinimumWidth(TBPORTLIST_MINWIDTH);
 
    tbPortList.setModel(&portList);
 
    ui->cbPortList->setModel(&portList);
 
    QObject::connect(ui->cbPortList,
 
                     SELECT<int>::OVERLOAD_OF(&QComboBox::activated),
 
                     this, &PortControl::onCbPortListActivated);
 
    QObject::connect(&tbPortList,
0 comments (0 inline, 0 general)