How to port KIntSpinBox::setSuffix

laurent Montel montel at kde.org
Tue Jun 3 17:40:43 UTC 2014


Le mardi 3 juin 2014 19:25:54 David Faure a écrit :
> On Tuesday 03 June 2014 18:10:50 Kevin Ottens wrote:
> > Hello,
> > 
> > On Tuesday 03 June 2014 17:59:18 David Faure wrote:
> > > On Tuesday 03 June 2014 17:53:22 Kevin Ottens wrote:
> > > > I'm not sure I get the reasoning leading to that conclusion. Can't be
> > > > done
> > > > upstream in Qt?
> > > 
> > > This is all about calling i18n() at runtime, from within the widget
> > > (when
> > > the value changes), on a KLocalizedString member (-> i.e. it's based on
> > > a
> > > delayed translation mechanism).
> > 
> > Ah OK, I see now.
> > 
> > BTW, just wondering if we wouldn't want that by composition instead of
> > inheritance.
> 
> Hmm. We'd have something that connects to the valueChanged signal of the
> spinbox and adjusts the suffix. Harder to use in QtDesigner, though.
> 
> > Won't we need the equivalent for QDoubleSpinBox too?
> 
> I'm not sure. Do you use singular or plural for 1.15? :-)
> Did kdelibs4 have that functionality?

No it doesn’t have :)
In KDoubleNumInput we use normal "void setSuffix(const QString &suffix);" 
=> not necessary to create it for QDoubleSpinbox

Regards
--
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53,  http://www.kdab.fr




More information about the Kde-frameworks-devel mailing list