Skip to content

Instantly share code, notes, and snippets.

@Zren
Created February 28, 2017 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zren/4864507f2eeddfe36c7496d59a8fa295 to your computer and use it in GitHub Desktop.
Save Zren/4864507f2eeddfe36c7496d59a8fa295 to your computer and use it in GitHub Desktop.
import QtQuick 2.5
import QtQuick.Layouts 1.3
import QtQuick.Layouts 1.0
import QtQuick.Window 2.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.0
import QtMultimedia 5.6
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import QtWebKit 3.0
import org.kde.draganddrop 2.0 as DragAndDrop
Window {
id: window
x: 0
y: 0
width: 300
height: 300
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: Qt.quit(0)
}
Rectangle {
anchors.fill: parent
color: "#386" //theme.backgroundColor
}
// Connections {
// target: slider
// onHeightChanged: console.log(theme.themeName + ':', height + 'px')
// }
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Layout.preferredHeight: slider.height
onHeightChanged: logTimer.restart()
PlasmaComponents.Slider {
id: slider
Layout.fillWidth: true
}
}
Connections {
target: theme
onThemeNameChanged: logTimer.restart()
}
Timer {
id: logTimer
interval: 200
onTriggered: console.log(theme.themeName + ':', slider.height + 'px')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment