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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
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 Smiley Happy

 

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.

Contributor
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

New Contributor
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.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
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. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: max Qstring length allowed in Label

A case of great minds think alike. Smiley Happy


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

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 263
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
Contributor
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,