[PyQt] problem in invoking event of QDateEdit embedded in QTableWidget cell

ad3d alhaddeshpande at gmail.com
Fri Jan 21 19:05:15 GMT 2011


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 

I am using PyQt4


Nick Gaens wrote:
> 
> Something like:
> 
> dt_d = new QTimeEdit()
> 
> dt_d.timeChanged.connect(self.onTimeChanged)
> 
> myTableWidget.setCellWidget(row, col, dt_d)
> 
> ...
> 
> def onTimeChanged(self, time):
> 
>     print time
> 
> 
> Btw, I assume you mean
> 'timeChanged<http://doc.qt.nokia.com/4.7/qdatetimeedit.html#timeChanged>'
> instead of 'dateChanged' when using a QTimeEdit :-)?
> 
> 
> On Fri, Jan 21, 2011 at 08:31, ad3d <alhaddeshpande at gmail.com> wrote:
> 
>>
>> 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
>> --
>> View this message in context:
>> http://old.nabble.com/problem-in-invoking-event-of-QDateEdit-embedded-in-QTableWidget-cell-tp30726350p30726350.html
>> Sent from the PyQt mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
> 
> 
> 
> -- 
> Nick Gaens
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 

-- 
View this message in context: http://old.nabble.com/problem-in-invoking-event-of-QDateEdit-embedded-in-QTableWidget-cell-tp30726350p30731763.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list