PDA

View Full Version : Qt 5.5 QML PageStack porting Sailfish App to Android



KeineAhnung
29th February 2016, 13:29
Hi,

I would like to port my Sailfish App (https://github.com/Sikarjan/harbour-brkaubing) to Android using Qt 5.5 and QtQuick 2.5. I managed to reuse my c++ file handler class but I am totally stuck on how to do the page stack. The "Hello World" example is only using one view and I could not find a extended Hello World with more views. How do you handle this? Do you putt all views in one file e.g. five Flickable{} and change the visibility? Or could I do several pages as I have in my Sailfish App?

If there is a HowTo for PageStack I am happy to work through. Some hints on how a basic QML project structure should be would be nice, too.

anda_skoa
29th February 2016, 14:16
I haven't worked with that PageStack element, but it sounds like a StackView could be a similar container.

Cheers,
_

KeineAhnung
29th February 2016, 17:23
Thanks for the hint. Looks like this is what I need.
Playing around with StackView I keep getting this error: "qml: Warning: StackView: cannot transition an item that is anchored!" but the help tells me that I need to anchor it. o.O
Also I cannot compile it for iOS or Android. Is StackView compatible with mobile devices?

anda_skoa
29th February 2016, 18:11
Playing around with StackView I keep getting this error: "qml: Warning: StackView: cannot transition an item that is anchored!" but the help tells me that I need to anchor it. o.O

Hmm, weird.



Also I cannot compile it for iOS or Android. Is StackView compatible with mobile devices?
I would be surprised if there was anything platform specific in this component.

What do you mean with "cannot compile"?
That the QtQuick Controls module does not compile?

Cheers,
_

KeineAhnung
29th February 2016, 20:53
I probably did something wrong. Maybe I should start with something simpler first. Any god tutorial for developing mobile apps with Qt?