[Qt-interest] QLineEdit::clear() crash

Paul Mensonides pmenso57 at comcast.net
Wed Jul 20 10:31:45 CEST 2011


On Mon, 18 Jul 2011 22:40:59 +0200, Francisco Gonzalez wrote:

> Check if le2 is a valid pointer.
> You can use QPointer for this:
>      QPointer<QLineEdit> le2 = new QLineEdit(parent);
> 
>      ...
>      if (le2)
>          le2->clear();
>      else
>          qDebug() << "Some text";
> 
> Hope this will help,
> Francisco

The pointer is definitely valid.  I'll try to formulate a minimal program 
that exhibits the behavior.

Regards,
Paul Mensonides




More information about the Qt-interest-old mailing list