[Qt-interest] QTabWidget::currentWidget() problem

Keshava Krishna keshavkrishna88 at gmail.com
Tue Mar 31 14:20:07 CEST 2009


Hi,
'm using a tabwidget to which 'm adding many QTextEdit s...
now i want to get a pointer to the currently activated widget...
i used the following code

    QTextEdit *ptr1 = textTab->currentWidget();

but it is giving the following error

Win.cpp:846: error: invalid conversion from ‘QWidget*’ to ‘QTextEdit*’

Before this used to be a warning and my program was working fine, but now it
has become an error( 'm really surprised )

can anyone help me out to debug this ?

Regards ,
Keshava.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090331/448538f2/attachment.html 


More information about the Qt-interest-old mailing list