Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, March 2007
Fwd: QtableWidgetItem QDoubleValidator


Message 1 in thread

Hello

I want allow doubles only on my table, but it doesn't work.
Look:

QLineEdit* line = new QLineEdit("47,26");
line->setValidator( new QDoubleValidator(10.00, 100.00, 2, line) );
QTableWidgetItem *item7 = new QTableWidgetItem(line->text());
item7->setData(Qt::UserRole, line);
item7->setTextAlignment(Qt::AlignHCenter);
this->ImagesTable->setItem(row, 7, item7);

Nevertheless, the item allow strings

How can I do it works?

Thanks



-- 
 [ signature omitted ]