-
-
Save trusktr/660786eb9f1927aef954 to your computer and use it in GitHub Desktop.
Animated hamburger-back icon in Material Design style done in QML
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
import QtQuick 2.2 | |
Rectangle { | |
width: 48 | |
height: 48 | |
color: "#9c27b0" | |
MouseArea { | |
anchors.fill: parent | |
onClicked: menuBackIcon.state = menuBackIcon.state === "menu" ? "back" : "menu" | |
} | |
MenuBackIcon { | |
id: menuBackIcon | |
anchors.centerIn: parent | |
} | |
} |
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
import QmlProject 1.1 | |
Project { | |
mainFile: "hamburger-icon.qml" | |
/* Include .qml, .js, and image files from current directory and subdirectories */ | |
QmlFiles { | |
directory: "." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment