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-09-21 19:55

Re: Help me to code for Sailfish OS
 
Fuzzillogic, why you dont c++ this stuff?

Fuzzillogic 2019-09-21 23:33

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1560507)
Fuzzillogic, why you dont c++ this stuff?

Because my C++ knowledge is almost non-existent. And still, why doesn't this work?

coderus 2019-09-22 09:31

Re: Help me to code for Sailfish OS
 
is phonehook using qml for this? can you point me to code?

Fuzzillogic 2019-09-22 10:54

Re: Help me to code for Sailfish OS
 
Phonehook uses C++/Qt for this. Source. But as far as I can gather, this dbus connection there is set up at a time the /calls/active path doesn't exist. That path only exists when there actually is an active call. It seems the Qt-code can handle this, but Nemo's DBusInterface can't.

popipo 2019-10-08 13:55

Re: Help me to code for Sailfish OS
 
Is it possible to copy selected text in SilicaWebView to the clipboard? The text is in an iframe, so I cannot do this by injecting JavaScript.

coderus 2019-10-08 14:08

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by popipo (Post 1560949)
Is it possible to copy selected text in SilicaWebView to the clipboard? The text is in an iframe, so I cannot do this by injecting JavaScript.

no idea actually, but you can check if webcat / webpirate have such feature or not

BGK 2019-10-10 15:28

Re: Help me to code for Sailfish OS
 
Hi out there!

Being a total newbie with nearly every part of the SFOS development universe (i.e. Silica, QML, qt, Python, C++ - I did some webdev with SQL, HTML, PHP, JavaScript, ect. in the past), I would like to create a SFOS-app to control some hardware devices.

The latter can done by WIFI and web-APIs (mostly sending HTTP-POSTs and caring for JSON responses) for which there are open source libraries available in Python and JavaScript (many of them using Node.js). The app should provide a simple GUI to control the devices (some buttons) and to display device states at last.

After reading a lot and taking my first steps with the SFOS IDE, a few questions remain yet:

1. Which way would you go: Qt Quick including Python libraries or Qt Quick (QML only?) including JavaScript libraries? And why would you do so?

2. How do I integrate avalible Python- or JavaScript libraries into my own projects correctly (especially JS-libs using Node.js) and what has to be taken care of doing so?

3. What do I have to take into account regarding the licenses of the libraries?

4. As SFOS (unfortunately) is a not very widespread plattform, I consider publishing the app for other plattforms (iOS, Android), too (starting with the sailfish version using the SFOS IDE). How can this be achieved in the most effective way?

Thanks in advance and greetings,

BGK

robthebold 2019-10-11 02:44

Re: Help me to code for Sailfish OS
 
I've been learning these things myself . . .

There are a couple of Python with QML sample apps on github that might or might not still compile.

Also, tIDE comes with a sample called Decitude that might be helpful. This one definitely will run on the latest sailfish.

BGK 2019-10-13 19:31

Re: Help me to code for Sailfish OS
 
Quote:

Originally Posted by robthebold (Post 1561005)
I've been learning these things myself . . .

That's why I love TMO! ;) Thanks for sharing your experience and your helpful links!

bobsikus 2019-10-15 06:22

Re: Help me to code for Sailfish OS
 
1 Attachment(s)
Quote:

Originally Posted by bobsikus (Post 1560116)
Hello guys, about coding, I have latest SDK 2.2.4. When I try to debug with gdb everything seems to work, except I does not have loaded correct symbols. Unfortunately there is a LOT of information about gdb, but I do not undestand them completely..

I can easily reproduce the problem and the memory address is always the same, journactl points to libQt5Quick.so.5.6.3
Code:

segfault at 4 ip 6fae6efa sp 77ae7c30 error 4 in libQt5Quick.so.5.6.3[6fa05000+264000]
Sep 09 16:27:59 SailfishEmul kernel: Code: e0 01 e9 a8 fe ff ff 90 8d b4 26 00 00 00 00 90 55 89 e5 57 56 53 e8 a5 57 f2 ff 81 c3 15 c1 25 00 83 ec 5c 8b 7d 08 8b 45 0c <8b> 77 04 39 46 74 0f 84 7f 02 00 00 85 c0 74 1e 8b 45 0c 8d 76 00

unfortunately then SDK doesn't show anything more specific, which should lead me somewhere, or at least I'm too dumb to understand it :) :
Code:

0x6fb90efa    8b 77 04    mov  0x4 (%edi),%esi
I would like to know step by step for idiots how to properly set up loading symbols in SDK, on emulator, wherever it is needed.

Thank you a lot

Hello guys, I have actually found the error even without debugger. But I have another question, might be stupid, but did not find any feasable answer in docs. WebPirate has its navigationbar on the bottom, to the top of this bar is anchored two things, one was already there before, one I have added. Problem is height, when I anchor bottom of (originally there were tabviewdialogs which shows various things) SilicaListView to the top of the navigationbar, height basically cannot be changed. If I specify height, f.e. by dividing original navigationbar height (or even if by real number) height is actually the same, but its bottom moves under the bar, so it more or less shows the height content how it was supposed to be calculated.. How to proceed to calculate height from the bottom ? does z-index matter (navigationbar has z-index different then other elements)? Thank you

EDIT: Well I have overlooked it, at https://doc.qt.io/qt-5/qml-qtquick-listview.html
Quote:

By default, a vertical ListView sets flickableDirection to Flickable.Vertical, and a horizontal ListView sets it to Flickable.Horizontal. Furthermore, a vertical ListView only calculates (estimates) the contentHeight, and a horizontal ListView only calculates the contentWidth. The other dimension is set to -1.
so it seems like it is not possible to do so, if anyone know how can be height managed, let me know please :)

EDIT2: since these buttons are not anyhow dynamic I have recreated SilicaListView and ListItems to Row and Rectangles and it fits.


All times are GMT. The time now is 09:13.

vBulletin® Version 3.8.8