how can i set focus policy for a Qtablewidget column?
-
Hello,
i need to make some columns have no focus and other have in Qtablewidget table -
Hi,
Do you mean clear the Qt::ItemIsSelectable flag on the items of the column ?
-
@SGaist
i have made the name, cost, public price, total Qlineedit but it's read only.
when the user trigger the barcode it will insert new row with the name that match the inserted barcode in the DB
so the user will not edit name or cost or public price or total it will be getten from the DB
so i want the user when he press TAB button on the keyboard it will skip name, cost, public price, total and jump from quantity to discount and expire date then it goes to the socund row and jump directly to quantity and so onsorry for the bad English
-
Did you already saw the Keyboard Focus in Widgets chapter in Qt's documentation ?
As well as QWidget::setTabOrder ?
-
From the looks of your screenshot you seem to have widgets in all the cells. It's not the case ?
-
@SGaist
yes there is a widgets in side the cells but i have set no focus for all the Qlineedit widgets
and it's still make focus on the cell it self not the widget in side it -
@davidlabib said in how can i set focus policy for a Qtablewidget column?:
yes there is a widgets in side the cells
And this kids, is why
setItemWidget
should burn in hell for eternity. I can understand using it for complex widgets but what are you setting widgets for simple lineedits, spinboxes and dateedit? -