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)

rob_kouw 2020-09-14 09:34

Re: Help me to code for Sailfish OS
 
Codearus, maybe you know some way to manipulate the virtual keyboard from QML.

I noticed OKboard stops functioning frequently. The cause of it, I think, is my app GMFS. it seems every time I use a Dialog with numerical input, like
Code:

inputMethodHints: Qt.ImhFormattedNumbersOnly
OKboard stops working when the keyboard is back to QWERTY.

Do you know a command I can use in my app - QML/JS - to revive OKboard?

coderus 2020-09-14 10:15

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by rob_kouw (Post 1569264)
Codearus, maybe you know some way to manipulate the virtual keyboard from QML.

I noticed OKboard stops functioning frequently. The cause of it, I think, is my app GMFS. it seems every time I use a Dialog with numerical input, like
Code:

inputMethodHints: Qt.ImhFormattedNumbersOnly
OKboard stops working when the keyboard is back to QWERTY.

Do you know a command I can use in my app - QML/JS - to revive OKboard?

no, i never used okboard, sorry

Markkyboy 2020-09-20 09:54

Re: Help me to code for Sailfish OS
 
Currently, I have Eclipse MQTT 1.3.1 running flawlessly on my Jolla1.

I note there are 3 files for MQTT on my device, found in /usr/bin/; mosquitto_passwd, mosquitto_sub and mosquitto_pub

I also have a remote control app (as previously discussed with regard to changing button colours when lights are on/off). I would like to utilise MQTT to tell my Jolla1 when a light switch has been activated and change/update the button colour accordingly.

I am quite conversant with MQTT commands, but totally lack any ideas on how to implement/include MQTT in my remote control application.

Side note: MQTT for QML is not part of Qt, it is QtAutomotive, which requires licensing, so no good using official routes.

Any input appreciated, thanks

coderus 2020-09-20 22:15

Re: Help me to code for Sailfish OS
 
you can't implement it with given cli tools

Markkyboy 2020-09-29 09:59

Re: Help me to code for Sailfish OS
 
Hi coderus,

I have a small niggle with fetching an image from openweathermap.org. See the following code;

HTML Code:

        Image {
            id: icon
            source: "http://openweathermap.org/img/wn/" + label.text + "@2x.png"
            anchors.horizontalCenter: parent.horizontalCenter
        }
        Label {
            id: label
            text: {
                (wDataCntr.weatherData)
                ? String(wDataCntr.weatherData.weather[0].icon)
                : ""
            }
            visible: false
        }
    }


Yields the following error;

[W] unknown:13 - file:///usr/share/my-weather-landscape/qml/pages/WeatherIcon.qml:13:5: QML Image: Error transferring http://openweathermap.org/img/wn/@2x.png - server replied: Not Found

but the required/expected image is returned and displayed.

How can I prevent this error?, is there a better way to retrieve the required image?

Thanks,

coderus 2020-09-29 10:01

Re: Help me to code for Sailfish OS
 
do not load image if label text is empty?

Markkyboy 2020-09-29 11:09

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1569416)
do not load image if label text is empty?

Cool, but I wasn't quite sure how to implement your suggestion.

However, instead I added a Timer with no interval to be triggered upon the feed being updated or the app being started, the image is loaded successfully and I do not see any error in console log (thumbs up!)

I'm still open to any suggestions (preferably with an example) if someone knows a better way.

coderus 2020-09-29 12:43

Re: Help me to code for Sailfish OS
 
try adding
Code:

enabled: label.text
to Image

Markkyboy 2020-09-29 14:32

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1569418)
try adding
Code:

enabled: label.text
to Image

Okay, will try later. My OWM account just got suspended for making too many calls, Oops!

levone1 2020-11-06 21:40

Re: Help me to code for Sailfish OS
 
Quick question for anyone - how can I see all dconf keys? I can use dconf list command, but it seems like it doesn't show everything, since I am able to change certain values with write command that I don't see listed...
(sorry I can't remember the specifics atm - it's something I've been meaning to get around to posting for a while now, after messing around with it months ago - maybe someone knows about it... I'll try to pull it back up at some point and refresh my memory...)


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

vBulletin® Version 3.8.8