please help me .. How Disable Move Focus / Cursor when Invalid input value ?
Hi All,
Please Helpme
I try create QtableWidget and QitemDelegate . ( QLineEdit )
how stop move cursor / focus when invalid input ? in QlineEdit
??
Re: please help me .. How Disable Move Focus / Cursor when Invalid input value ?
Probably, the easiest is to just setFlags on all the other cells:
Code:
{
for (int i = 0; i < tbl.rowCount(); i++)
for (int j = 0; j < tbl.columnCount(); j++)
if (!(tbl.item(i, j)->row() == allowed.row() &&
tbl.item(i, j)->column() == allowed.column()))
tbl.item(i, j)->setFlags(Qt::NoItemFlags);
}
int main(int argc, char * argv[])
{
tbl.setRowCount(1);
tbl.setColumnCount(3);
tbl.setItem(0, 0, item1);
tbl.setItem(0, 1, item2);
tbl.setItem(0, 2, item3);
DisableAllExceptOne(tbl, *item1);
tbl.show();
return a.exec();
}
Re: please help me .. How Disable Move Focus / Cursor when Invalid input value ?