Created
January 3, 2017 12:00
-
-
Save dtoebe/ba4e56a437b7c5de7aa6a5f97500594a to your computer and use it in GitHub Desktop.
WRITE A SIMPLE MARKDOWN EDITOR WITH GO-QML - main.qml - 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//assets/main.qml | |
... | |
ApplicationWindow { | |
... | |
toolBar: ToolBar { //Create a toolbar and set it as the ApplicationWindow's toolBar | |
//This will create the space and auto adjust the other children of ApplicationWindow down | |
RowLayout { //This formats the toolbar to move the buttons side by side | |
width: parent.width | |
height: prent.height | |
Button { | |
Layout.alignment: Qt.AlignRight //This tells QML that the button needs to be auto formatted to align right | |
text: "Copy To HTML" | |
onClicked: htmlText.copyToClip(mdarea.text) //We will create this method in the next part | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment