The Following 3 Users Say Thank You to Markkyboy For This Useful Post: | ||
![]() |
2017-09-06
, 21:23
|
|
Posts: 125 |
Thanked: 1,142 times |
Joined on Feb 2010
@ Austria
|
#2
|
import QtQuick 2.4 import Sailfish.Silica 1.0 CoverBackground { CoverPlaceholder { id: coverPlaceholder text: "National Rail" icon.source: "../images/harbour-nationalrail.png" } CoverActionList { CoverAction { iconSource: "image://theme/icon-cover-search" onTriggered: showSearch() } } function showSearch() { pageStack.push(Qt.resolvedUrl("Search.qml")) appWindow.activate() } }
The Following 9 Users Say Thank You to merlin1991 For This Useful Post: | ||
![]() |
2017-09-09
, 18:38
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#3
|
import QtQuick 2.4 import Sailfish.Silica 1.0 CoverBackground { id: cover CoverPlaceholder { id: coverPlaceholder text: "National Rail" icon.source: "../images/harbour-nationalrail.png" } CoverActionList { CoverAction { iconSource: "image://theme/icon-cover-search" onTriggered: showSearch() function showSearch() { pageStack.push(Qt.resolvedUrl("Search.qml")) window.activate(); } } } }
CoverBackground { id: cover CoverPlaceholder { id: coverPlaceholder text: "National Rail" icon.source: "../images/harbour-nationalrail.png" } CoverActionList { CoverAction { iconSource: "image://theme/icon-cover-search" onTriggered: { window.activate() pageStack.push("Search.qml", {}, PageStackAction.Immediate) } } } }
![]() |
2017-09-11
, 00:55
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#4
|
import QtQuick 2.0 import Sailfish.Silica 1.0 CoverBackground { CoverPlaceholder { text: "Live Departure Boards" icon.source: "../images/harbour-nationalrail.png" } CoverActionList { CoverAction { iconSource: "image://theme/icon-cover-search" onTriggered: { pageStack.navigateBack(PageStackAction.Immediate) pageStack.push('Search.qml') pageStack.navigateForward(PageStackAction.Immediate) activate() } }
The Following 5 Users Say Thank You to Markkyboy For This Useful Post: | ||
I'm having problems making a cover action work. Here's my current code;
file hierarchy;
CoverPage - /usr/share/harbour-nationalrail/qml/cover/CoverPage.qml
Other pages - /usr/share/harbour-nationalrail/qml/pages/Search.qml
Thanks,
p.s. courteous answers only please
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
Last edited by Markkyboy; 2017-09-11 at 01:00. Reason: Cover action (Solved)