Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
gurbaniv
Posts: 2
Registered: ‎07-31-2013
My Device: BB10 Z10 - 10.1.0.4*
My Carrier: Telus

max Qstring length allowed in Label

Hi all, thanks for your attention and any suggestion/help you can provide:

 

Here we go :smileyhappy:

 

I have following layout in QML:

 

Page {
ScrollView {
scrollViewProperties {
scrollMode: ScrollMode.Vertical
}
Container {
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
Label {

id: label1
objectName: qsTr("label1")
textStyle.base: SystemDefaults.TextStyles.BigText
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
multiline: true
textStyle.textAlign: TextAlign.Center
}
}
}
}

 

 

In my c++ code I'm setting a huge UTF-8 QString to this label:

 

QString text = getData();                                                        //a helper function to take care of pulling everything from

                                                                                                   //db and then packing it all and returning to caller

shabadLabel->setText(text);

 

 

In most cases everything works fine. But in some cases when text.length() passes a certain limit, something trims out the end part of the string.

 

From debugging I can see the text.length in one of those cases is ~55000.

Also I verified that Label was able to show text upto 3000 characters.

Also I can say this without any doubt that this has nothing to do with ScrollView or Container.

 

No Label, ScrollView or Container documentation defines any kind of limit other than somewhere it says that it can be device dependent.

 

I also tried using a TextArea but without much help, it went upto ~4000 characters.

 

 

 

So, finally, is there a known char limit for Label or TextArea, or if it's a device dependent thing then how can I overcome this issue? Please help.

Please use plain text.
Contributor
vincentechi
Posts: 23
Registered: ‎08-13-2013
My Device: Z10
My Carrier: chinaunicom

Re: max Qstring length allowed in Label

Hi there

I have the same problem,I want to know do you solve it? Thank

Please use plain text.
New Contributor
gurbaniv
Posts: 2
Registered: ‎07-31-2013
My Device: BB10 Z10 - 10.1.0.4*
My Carrier: Telus

Re: max Qstring length allowed in Label

Nope. I asked same question on stackoveflow here .

 

May be we should open a support ticket, but I don't know how and where.

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: max Qstring length allowed in Label

How about using a webview?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
simon_hain
Posts: 15,870
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: max Qstring length allowed in Label


BBSJdev wrote:

How about using a webview?


I suggested the same at vincentechi other post about this here

and in his other other post here somebody posted a code sample as well as the idea was not sufficient.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: max Qstring length allowed in Label

A case of great minds think alike. :smileyhappy:


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
tommy20
Posts: 249
Registered: ‎05-18-2011
My Device: Curve 9300, BB10 Dev Alpha C, Z10

Re: max Qstring length allowed in Label

How about using multiple labels?
--tom
Please use plain text.
Contributor
vincentechi
Posts: 23
Registered: ‎08-13-2013
My Device: Z10
My Carrier: chinaunicom

Re: max Qstring length allowed in Label

yeah I just want to tell you for this,:Clap:

Please use plain text.