![]() |
Getting started whit QT and Sailfish
Hi!
I have some basic programming experience on Python, VBA and Matlab. I had idea to try my hand on Sailfish programming whit a simple date calculator (user inputs date and code adds x-dates to it, the result is displayed). I figured installing the SDK and VM; but now I'm having difficulties submerging to QT world. Is it C++ or own language? Is there any books or websites, besides the offical QT and Sailfish sites, that could point me to start? I really appreciate all help! :) |
Re: Getting started whit QT and Sailfish
Similar case here. I have coded small programs for PC with c++ so far and have never used and needed a UI. Now I am having diffuculty understanding connections between ui and the code.
|
Re: Getting started whit QT and Sailfish
I think you will find Qt very easy to work with.
I have, myself, not yet started to develop anything for Sailfish but I have been using Qt/ QtCreator to develop various PC applications for a number of years. Regarding Sailfish/Qt/Silica I think you should have look here for a start: https://sailfishos.org/sailfish-sili...roduction.html https://sailfishos.org/sailfish-silica/ https://sailfishos.org/sailfish-sili...ilica-all.html //j |
Re: Getting started whit QT and Sailfish
Just download the sdk from sailfish.org. It has example programs and a good reference with it.
|
Re: Getting started whit QT and Sailfish
I'm wondering whether the silica components ONLY can be used from QML?
It seems to work to do a completely native application, even with QtWidgets (even though QtWidgets of course looks bad). But being able to do completely native apps would also be nice. Otherwise, a lot of bridging code needs to be added for all existing code I have between Native and QML. |
Re: Getting started whit QT and Sailfish
QtWidgets are obsolete and you should avoid them. You should use QML or implement your UI in code with Qt Quick in mind. Also, by using QML you will automaticaly use HW accelarated graphics engine.
trx. |
Re: Getting started whit QT and Sailfish
Bit more digging and I found PySide! Now I only need to fresh up my memories of Phyton.
http://qt-project.org/wiki/Category:...ndings::PySide |
Re: Getting started whit QT and Sailfish
Oh, I'm afraid I need little more help tackling the learning curve.I have zero UI experience -engineering way was to do it in command line.
I have found no way to link my python code to Sailfish qml. For example my python code has line: Code:
def kysy_vuosi():Any help (and patience) is well appreciated. |
Re: Getting started whit QT and Sailfish
Look at here about Python on Sailfish :
https://lists.sailfishos.org/piperma...er/001593.html |
Re: Getting started whit QT and Sailfish
Say I have a page stack which from bottom to top goes "a.qml" -> "b.qml" -> "c.qml".
- pageStack.push(Qt.resolvedUrl("b.qml")) will get me from a to b - pageStack.pop() will take me back from b to a However nothing happens when I try giving pop a page argument, ie going from a to b, then from b to c, and then from c going DIRECTLY back to a with: - pageStack.pop(Qt.resolvedUrl("a.qml")) Why is this? How can I go directly back to the first page? |
Re: Getting started whit QT and Sailfish
Quote:
Code:
pageStack.pop(null)Code:
pageStack.pop(myPage) |
Re: Getting started whit QT and Sailfish
Thanks for your answer! However pop(null) will in my case do the same as pop(), ie go back one step only. I'll look into find()...
|
Re: Getting started whit QT and Sailfish
Using find() at best I get the same result as with pop() and pop(null), it'll pop the top most page off, but not more.
Edit: As a workaround I thought I'd try clear() and then push the first page, but no luck so far. The stack is cleared allright, but I'm not sure how to push the first page after that.. |
Re: Getting started whit QT and Sailfish
Okay, keeping it simple I made this experiment:
1: I create the basic app in SDK 2: I create a new qml page "ThirdPage.qml" 3: I pretty much copy the "FirstPage.qml" contents to "SecondPage.qml" and "ThirdPage.qml", changing the PullDownMenus' MenuItem to: SecondPage.qml: Code:
MenuItem {Code:
MenuItem { |
| All times are GMT. The time now is 12:42. |
vBulletin® Version 3.8.8