QFormLayout*fl;
setLayout(fl=new QFormLayout);
fl->addRow(tr("Printer:"),mprnselect=new QComboBox);
+ mprnselect->setMinimumContentsLength(10);
+ mprnselect->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
int cur=-1,def=-1;
for(const QPrinterInfo&info:QPrinterInfo::availablePrinters()){
if(info.printerName()==prn->printerName())cur=mprnselect->count();
hl->addWidget(new QLabel(tr("Printer:")));
hl->addWidget(printer=new QComboBox,1);
printer->setEditable(false);
+ printer->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ printer->setMinimumContentsLength(10);
printer->addItem(tr("(Default Printer)"));
QList<QPrinterInfo>aprn=QPrinterInfo::availablePrinters();
int cprn=0;
gl->addLayout(hl=new QHBoxLayout,row,1);
hl->addWidget(m_title=new QComboBox,1);
m_title->setEditable(true);
+ m_title->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ m_title->setMinimumContentsLength(8);
m_title->lineEdit()->setPlaceholderText(tr("Title"));
for(const QString&tt:titles)m_title->addItem(tt);
hl->addWidget(m_name=new QLineEdit,2);
m_zipcode->setPlaceholderText(tr("Zip Code"));
hl->addWidget(m_city=new QComboBox,1);
m_city->setEditable(true);
+ m_city->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ m_city->setMinimumContentsLength(5);
m_city->lineEdit()->setPlaceholderText(tr("Chose City"));
for(const QString&ct:cities)m_city->addItem(ct);
gl->addWidget(new QLabel(tr("State:")),++row,0);
gl->addWidget(m_state=new QComboBox,row,1);
m_state->setEditable(true);
+ m_state->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ m_state->setMinimumContentsLength(8);
m_state->lineEdit()->setPlaceholderText(tr("State (optional)"));
for(const QString&st:states)m_state->addItem(st);
gl->addWidget(new QLabel(tr("Country:")),++row,0);
gl->addLayout(hl=new QHBoxLayout,row,1);
hl->addWidget(m_country=new QComboBox,1);
+ m_country->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ m_country->setMinimumContentsLength(10);
updateCountry();
if(req->hasRight(req->RCreateCountry)){
hl->addWidget(p=new QPushButton(tr("New...")));
vl2->addWidget(new QLabel(tr("Shipping Method:")),0);
vl2->addWidget(cartship=new QComboBox,0);
cartship->setEditable(false);
+ cartship->setMinimumContentsLength(15);
+ cartship->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
connect(cartship,SIGNAL(currentIndexChanged(int)),this,SLOT(updatePrice()));
vl2->addSpacing(10);
vl2->addWidget(new QLabel(tr("Comments:")),0);
setLayout(vl=new QVBoxLayout);
vl->addWidget(entranceevent=new QComboBox,0);
entranceevent->setEditable(false);
+ entranceevent->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ entranceevent->setMinimumContentsLength(20);
vl->addSpacing(30);
vl->addWidget(new QLabel(tr("Enter or scan Ticket-ID:")),0);
vl->addWidget(entrancescan=new MBarcodeLine,0);