added opening in speaker:
This commit is contained in:
parent
1523a2ea2a
commit
edc8eac2e7
1 changed files with 15 additions and 0 deletions
15
qml/main.qml
15
qml/main.qml
|
@ -78,6 +78,11 @@ ApplicationWindow {
|
|||
textFontSize = fontSizes[textFontSizeIndex]
|
||||
}
|
||||
|
||||
function removeHTML(str) {
|
||||
forEscapingHTML.text = str
|
||||
return forEscapingHTML.getText(0, forEscapingHTML.length)
|
||||
}
|
||||
|
||||
function keyPressed(event) {
|
||||
switch (event.key) {
|
||||
case Qt.Key_Right:
|
||||
|
@ -113,6 +118,10 @@ ApplicationWindow {
|
|||
case Qt.Key_Return:
|
||||
Qt.openUrlExternally(content.post.link)
|
||||
break
|
||||
case Qt.Key_S: {
|
||||
console.log(Qt.openUrlExternally("speaker:"+ removeHTML(content.post.content)))
|
||||
break
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
@ -176,6 +185,12 @@ ApplicationWindow {
|
|||
id: server
|
||||
}
|
||||
|
||||
TextArea {
|
||||
id: forEscapingHTML
|
||||
visible: false
|
||||
textFormat: TextEdit.RichText
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if(serverLogin.loggedIn()) {
|
||||
loggedIn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue