Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.51 KB | None | 0 0
  1. import QtQuick 2.5
  2. import Sailfish.Silica 1.0
  3. import QtSensors 5.2
  4.  
  5. Page {
  6.     Compass {
  7.         id: compass
  8.         active: true
  9.         skipDuplicates: true
  10.     }
  11.     Image {
  12.         anchors.centerIn: parent
  13.         scale: Math.min(parent.width, parent.height) / Theme.iconSizeMedium
  14.         source: "image://theme/icon-m-capslock"
  15.         rotation: {
  16.             if (!compass.reading) return 0;
  17.             return compass.reading ?
  18.                 - compass.reading.azimuth : 0
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement