You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
493 B
18 lines
493 B
15 years ago
|
/////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// functions generating layout-aware widgets
|
||
|
//
|
||
|
/////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#include "newwidget.h"
|
||
|
|
||
|
QLineEdit *newLineEdit(int visiblewidth, QWidget *parent) {
|
||
|
QLineEdit *l = new QLineEdit(parent);
|
||
|
if(visiblewidth == 0)
|
||
|
l->setMinimumWidth(l->sizeHint().width());
|
||
|
else
|
||
|
l->setFixedWidth(l->fontMetrics().width('H') * visiblewidth);
|
||
|
|
||
|
return l;
|
||
|
}
|