Hi,
i have a lineEdit widget set to QTableWidget cell. With validator added to lineEdit.
Can i get any signal from QTableWidget, if the lineEdit set of the tableWidget is changed ?
like cellChanged(int,int) when we use QTableWidget Item
Hi,
i have a lineEdit widget set to QTableWidget cell. With validator added to lineEdit.
Can i get any signal from QTableWidget, if the lineEdit set of the tableWidget is changed ?
like cellChanged(int,int) when we use QTableWidget Item
The first thing that comes to my mind if you don't want to use your QLineEdit pointer, is that you can connect to the cell widget signals by using:
Qt Code:
connect(pTableWidget->cellWidget(row,col),SIGNAL(someSignal()),pObj,SLOT(someSlot()));To copy to clipboard, switch view to plain text mode
but you can also just use the pointer to your QLineEdit.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Ya true, but i can't use validator with QTableWidgetItem so by using that method i have to wait for the user to finish entering the value for validating.
I want to validate as user keys in the data for ex: i don't want the user to enter the alphabet in cell where i am expecting integer.
Any way i have solved by connecting the signals of the lineEdit to slot almost the same way as you said. But i want to know is there a better solution ?
Bookmarks