The Following User Says Thank You to Markkyboy For This Useful Post: | ||
![]() |
2017-11-13
, 08:00
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#2
|
![]() |
2017-11-13
, 10:52
|
Posts: 426 |
Thanked: 1,812 times |
Joined on Dec 2013
|
#3
|
... onLinkActivated: pageStack.push(Qt.resolvedUrl("MessageView.qml"), {"gotoUrl": link})
Page { property string gotoUrl SilicaWebView { anchors.fill: parent header: PageHeader { title: "Message view" } url: gotoUrl } }
The Following 5 Users Say Thank You to llelectronics For This Useful Post: | ||
![]() |
2017-11-13
, 11:21
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#4
|
It seems to me like you are searching for the pageStack feature to allow attaching a new page with the webview which should load the url for you.
You can easily to this that way.
StationMessages.qml
MessageView.qmlCode:... onLinkActivated: pageStack.push(Qt.resolvedUrl("MessageView.qml"), {"gotoUrl": link})
Of course the MessageView.qml maybe needs some GUI elements aswell like a simple bar with back button or reload stop button. Thats something you can take a look at harbour-tidings. It has a simple and easy toolbar (in contrast to my Webcat browser which has a very complicated toolbar thingy): https://github.com/pycage/tidings/bl...bPage.qml#L106Code:Page { property string gotoUrl SilicaWebView { anchors.fill: parent header: PageHeader { title: "Message view" } url: gotoUrl } }
The Following 2 Users Say Thank You to Markkyboy For This Useful Post: | ||
Currently, when a message has been generated by the external source, the message may contain a link to take you to the operators website for further information, by clicking the link, sailfish-browser is opened, but I would actually prefer WebView to handle the page, but how do I make this work, here's my code so far;
StationMessages.qml
MessageView.qml
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..