[Qt-interest] QLabel text () returns QString::null aftersetting empty QString

Scott Aron Bloom Scott.Bloom at onshorecs.com
Thu Sep 9 19:23:43 CEST 2010



-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Frank Hemer
Sent: Thursday, September 09, 2010 10:19 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] QLabel text () returns QString::null aftersetting empty QString

On Thursday 09 September 2010 19:07:25 Thiago Macieira wrote:
> Em Quinta-feira 09 Setembro 2010, às 15:38:33, Frank Hemer escreveu:
> > Is the behavior mentioned in the subject intended/known or is it a bug
> > that needs to be filed?
>
> Unless otherwise specified in the documentation, you shouldn't rely on
> methods keeping the null-vs-empty setting.

Thanx for clearing this.

However this makes it impossible to track if objects (QLabel, QLineEdit, 
QTextEdit and probably others) have been modified bec. comparing former state 
to later state is no more possible:-( ... for code that differentiates 
between QString ("") and QString::null ...

Frank
------------------------------

Not unless you simply tag it when you watch for the textChanged signals.. Though for QLabel, the user cant modify the label directlky so Im not sure how it would be so difficult to track.

Scott




More information about the Qt-interest-old mailing list