maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Help me to code for Sailfish OS (https://talk.maemo.org/showthread.php?t=100817)

coderus 2019-11-23 18:13

Re: Help me to code for Sailfish OS
 
QNetworkRequest for network stuff, and QRegExp for parsing reply

bauidch 2019-11-25 13:24

Multiple TexFields
 
In the People App(Called "Kontakte" in german) you can add multipe Numbers. I'm guessing this phone number filed is a TextFiled in QML.

Now I would like to do this also in my app.

Does anyone have an idea where I can find it in the SailfishOS code? Or have someone an example to handel this?

See the orginal Question: https://together.jolla.com/question/...comment-217726

bauidch 2019-11-25 14:27

Re: Help me to code for Sailfish OS
 
Hey Guys

I want to add dynamic TextFields to my app, like the people app for Jolla.

Does anyone have an idea where I can find it in the SailfishOS code? Or have someone an example to handel this?

See the orginal Question here: https://together.jolla.com/question/...le-textfields/

rob_kouw 2019-11-26 16:33

Re: Help me to code for Sailfish OS
 
You're not a man of many words, are you? [:D] But thanks, I think I found the way to start thanks to your guidance.

I would like to find out how to store files, probably in .local. With that I think it will be easier to debug. At least now I don't know how to check whether my RegExps lead anywhere.

Then I think I will make a QJsonArray of 10 QJsonObjects filled with information of the photo (jpg, title, caption, source). This QJsonArray would be handed to the QML page. If so, how. If not, what then?

My GitHub repo, still very premature: https://github.com/cow-n-berg/harbour-news-photos

coderus 2019-11-26 17:31

Re: Help me to code for Sailfish OS
 
I'd like to teach to code, not write code instead)

QJsonArray/QJsonObject can be handled natively as Object in QML

For storing location check QStandardPaths class

BGK 2019-11-30 11:37

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1562660)
I'd like to teach to code, not write code instead

:D ... :cool: ...

rob_kouw 2019-12-06 09:00

Re: Help me to code for Sailfish OS
 
Do you have an example on how to initialize a QJsonArray in the QML code, so I can fill it up with QJsonObjects in the C++ code?

coderus 2019-12-06 09:30

Re: Help me to code for Sailfish OS
 
why to initialize from one place and fill with data from another?

rob_kouw 2019-12-06 09:42

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1563060)
why to initialize from one place and fill with data from another?

I have no clue how to get the data from the Downloader to the QML window that will show the photo, and that will handle all the UI.

coderus 2019-12-06 09:55

Re: Help me to code for Sailfish OS
 
Save downloaded data as file and pass path to this file to qml


All times are GMT. The time now is 16:32.

vBulletin® Version 3.8.8