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)

Markkyboy 2019-11-12 20:37

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by Ancelad (Post 1561893)
Code:

import QtFeedback 5.0

HapticsEffect {
        id: activeEffect
        duration: 500 // in ms
        intensity: 0.2 // from 0 to 1 with 0.1 step-size
        running: button.pressed
}
Button {
        id: button
        width: text.width
        text: "Test"                                       
        anchors.horizontalCenter: parent.horizontalCenter
        onClicked: activeEffect.start()         
}


Excellent!, just what I needed and with a little jigger-pokery I now have 29 buttons with short feedback and will be inserting this into other "remote-control" app projects.

Thanks very much!

Regards,

rob_kouw 2019-11-16 19:46

Re: Help me to code for Sailfish OS
 
I hardly dare to ask... Today I decided to try and create an app. But first: install the SDK on Windows 10. It refuses to even start. The installer says:

Git not installed: Please ensure Git is installed and in PATH...

GitHub Desktop was already installed, maybe as an app (as I cannot find it under C:\Programs). So I downloaded and installed Git from
https://git-scm.com/download/win
and this did not help at all. Is there a secret Git to be downloaded?

Thanks!
Rob

coderus 2019-11-16 19:47

Re: Help me to code for Sailfish OS
 
looks like a thread for TJC

BGK 2019-11-18 18:10

How to create "advanced" GUI?
 
How do you create "advanced" GUI for SFOS apps?

Simple (text centered) designs can be created via IDE in text mode, but how do you create apps which are more "graphical" oriented?

As design mode isn't available in Sailfish IDE, is there another way to create QML-page designs in a more graphic way?

coderus 2019-11-18 18:54

Re: Help me to code for Sailfish OS
 
if you not aware of qml you can practice with desktop qt creator to learn qml basics

BGK 2019-11-18 20:42

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1562224)
if you not aware of qml you can practice with desktop qt creator to learn qml basics

Well, it's one way placing UI-elements in colums and rows by defining their width (and other properties) like in HTML/CSS - another would be building UI-design like in graphic software.

The latter I'm looking for... :)

coderus 2019-11-18 20:51

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by BGK (Post 1562227)
Well, it's one way placing UI-elements in colums and rows by defining their width (and other properties) like in HTML/CSS - another would be building UI-design like in graphic software.

The latter I'm looking for... :)

main goal is making fluid software ui which will be looking good on any device resolution and screen orientation. show me how to do this in graphic software :)

rob_kouw 2019-11-23 12:09

Re: Help me to code for Sailfish OS
 
All right coderus, the SDK is up and running. I started with a new QtQuick/Sailfish project. It contains an empty Cover Page and two empty Pages.

I find working with a new environment not easy: where to start? What examples to use? More or less similar would be Daily Comics, but they use python code. I've done some python, but incorporating it into QtQuick seems another hurdle to me.

Now, what I want to do:
1. download the webpage of https://nos.nl/ as a text file
2. zoom in on the <section class="news-in-pictures">
3. take the details from all the (10) <figure>: url, caption, text
4. download the images (each 100 kB, write the files or keep in memory?)
5. display them, optionally with caption and text

I found filedownloader https://wiki.qt.io/Download_Data_from_URL#Usage but the first instruction
Code:

private slots:
 void loadImage();

already gives an error in the IDE. So... maybe not the best start. Any ideas?

coderus 2019-11-23 12:15

Re: Help me to code for Sailfish OS
 
You can always start with component gallery example project, not with dummy one.

rob_kouw 2019-11-23 13:35

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1562505)
You can always start with component gallery example project, not with dummy one.

Right, I found that one too. I was going for that after I solved all the downloading.

The QtQuick examples I found on web pages are aiming to show the url directly in a browser. Do you know a way to download that url as a text?

Maybe QWebDownloadItem? Maybe QNetworkAccessManager with a get method? It's so hard finding an example...


All times are GMT. The time now is 15:00.

vBulletin® Version 3.8.8