[SailfishDevel] Wanting to port my app, QML questions (TextArea)

mark at faultycode.com mark at faultycode.com
Wed Sep 18 11:53:01 UTC 2013


Hi Everyone,

I have written an IRC client for iOS over the last years, and I am at a 
point where I'd like to choose a second platform to port my app over to. 
I've always been fond of Qt, but lost interest in it when Nokia 
switched to windows phone. Thus, I never got around to learning QML, 
which means I only have knowledge of making GUI's with QWidgets. 
However, now with Jolla, I'm really interested in starting my port.

I have a few questions/concerns before I start porting.

On the iOS side of things, I paste all my IRC messages into a textView 
(UITextView for the people here that know).
As of iOS 7, I use the new TextKit features. That is, I can take a 
message coming from the TCP socket, make an Attributed String out of it 
(I guess a rich string in the Qt world), apply colours, underlining, 
bold etc to specific words depending on the colour codes in the message, 
then finally append it to the textView.

I've been skimming through the QML components for Sailfish, and I've 
found the TextArea component. There is a string property to it, but I 
don't know if I can simply append data to it (specifically rich text 
data). It seems to me it's either read, or set.

Is the TextArea string property modifiable, or is it immutable? If it's 
immutable, then perhaps I need to look at webkit.
Secondly, the textView in iOS is capable of having URL links applied to 
ranges of text. Is that also possible with TextArea?

In general, I prefer not to use Webkit, since my html and javascript 
skills are really lacking. Hence why I have been using rich text editing 
in my iOS app. However, if there is no other possibility, then I just 
might have to go the webkit route.

Those are my biggest questions really. QML is completely new to me, but 
seems like a fun and powerful thing to learn.

Thanks for you help,

-Mark


More information about the Devel mailing list