On Wednesday, 18 September 2019 06:57:11 PDT Jason H wrote:
> I do prefer python's approach where the character size change does not come
> with an API change. Maybe discussion for Qt6?. I would think they C++ way
> would be to have 1 API and a template class? (Though I think some people
> cringe
Didn't add the list...
I guess the closest you get with a pure QByteArray solution is a two-step
operation:
auto x = QByteArray::Number(6).rightJustified(10, '0');
-Even
-Original Message-
From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of
Kristoffersen, Even (NO14)
18.09.2019, 16:59, "Jason H" :
>> Sent: Wednesday, September 18, 2019 at 2:50 PM
>> From: "Giuseppe D'Angelo via Interest"
>> To: interest@qt-project.org
>> Subject: Re: [Interest] QByteArray vs QString, arg, why is there no arg()?
>>
>> Il 18/09/19 13:16, Jason H ha scritto:
>> > What's
> Sent: Wednesday, September 18, 2019 at 2:50 PM
> From: "Giuseppe D'Angelo via Interest"
> To: interest@qt-project.org
> Subject: Re: [Interest] QByteArray vs QString, arg, why is there no arg()?
>
> Il 18/09/19 13:16, Jason H ha scritto:
> > What's the best way to zero-pad a QByteArray?
> >
Il 18/09/19 13:16, Jason H ha scritto:
What's the best way to zero-pad a QByteArray?
What I want is QByteArray("%1").arg(6, 10, 10, '0')
Mostly it has to do with the fact that QByteArray is sitting between two
worlds; on one side it's just a container of bytes, on the other side it
has
Just use the fill() function: https://doc.qt.io/qt-5/qbytearray.html#fill
-Even
-Original Message-
From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Jason H
Sent: onsdag 18. september 2019 13:16
To: interest@qt-project.org
Subject: [External] [Interest] QByteArray vs
Shiver me timbers! I often find myself using QString::arg() overloads for
formatting, but nothing like that exists for when I'm working with just bytes,
say for a socket or serial port. So I find myself constructing it as a QString
and then .toLocal8bit() , which just seems wasteful.
What's
[resent in adapted form from the plasma-devel ML in hope of getting a reply
here]
Hi,
I had a recent run-in with a style hint that should actually be a platform
(QPA) specific property (à la AA_DontUseNativeMenuBar; see QTBUG-77928) and
then realised it could be useful to have a standalone