Skip to content

Instantly share code, notes, and snippets.

@oKcerG
oKcerG / bibinding.cpp
Created August 11, 2020 08:09
BiBinding
#include "bibinding.h"
#include <QDebug>
QQmlProperty BiBinding::source() const
{
return m_source;
}
void BiBinding::setSource(const QQmlProperty& source)
{
Rect {
radius: Math.min(width, height) / 2
}
import QtQuick 2.15
import QtQml 2.15
Behavior {
id: root
property QtObject fadeTarget: targetProperty.object
property string fadeProperty: "scale"
property int fadeDuration: 150
property string easingType: "Quad"
import QtQuick 2.9
Binding {
id: root
property int delay: 500
property alias value: root._delayedValue
property alias _actualValue: root.value
property var _delayedValue
import QtQuick 2.7
Item {
id: root
property Flickable flickable: parent
anchors.fill: parent
property MouseArea mouseArea
readonly property bool active: flickable && (mouseArea ? mouseArea.drag.active : false)
import QtQuick 2.0
SequentialAnimation {
id: root
property QtObject target
property string fadeProperty: "opacity"
property int fadeDuration: 150
property alias outValue: outAnimation.to
property alias inValue: inAnimation.to
property alias outEasingType: outAnimation.easing.type
import QtQuick 2.0
MouseArea {
id: root
property Item draggedParent: parent ? parent.parent || parent : null
property var modelIndex: typeof model !== "undefined" ? model.index : undefined
signal move(int from, int to)
property bool dropEnabled: true
property bool dropBlocked: false
import QtQuick 2.7
Rectangle {
property alias textItem: textItem
property alias text: textItem.text
property alias textColor: textItem.color
property alias maxWidth: textItem.width
property alias maxHeight: textItem.height
import QtQuick.Controls 2.0
import QtQuick 2.7
import QtQml 2.2
ScrollBar {
id: scrollBar
property ListView listView: parent
stepSize: 1 / listView.count
property real effectiveStep: stepSize * (1 - 0)
size: listView.visibleArea.heightRatio