PDA

View Full Version : problem in invoking event of QDateEdit embedded in QTableWidget cell



ad3d
21st January 2011, 08:28
i have added QTimeEdit in a QTableWidget cell using setCellWidget
its name is dt_d

Now i want to write a function on which will be triggered on dateChanged event

but the problem i am facing is its not accepting dateChanged trigger as well as its not accepting itemChanged event of QTableWidget

can some plz tell me how can i write a function which will be triggered when i change d date in QDateEdit which is embedded in a cell of a QTableWidget

ITS A BIT URGENT
PLZ HELP

THANX IN ADVANCE

ChrisW67
21st January 2011, 08:45
i have added QTimeEdit in a QTableWidget cell using setCellWidget

how can i write a function which will be triggered when i change d date in QDateEdit which is embedded in a cell of a QTableWidget
Which is it, a QTimeEdit or a QDateEdit? You would not expect a QTimeEdit to emit the dateChanged() signal because it cannot change the date.

All you need to do is connect() the signal from your widget to a slot. What have you actually tried? Cut and paste some code snippets.

ad3d
21st January 2011, 10:05
it is a QDateEdit

i am trying to create a function like

def on_dt_d_dateChanged(self):
print 'Date Changed'

its not working as i have set QDateEdit in QTableWidget cell

if i try to use same function on other QDateEdit which i have placed in a group container seperately it works...

def on_dob_date_dateChanged(self):
print 'Date Changed'

where dob_date is QDateEdit object