Skip to content

Instantly share code, notes, and snippets.

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
Rect {
radius: Math.min(width, height) / 2
}
import QtQuick 2.9
Binding {
id: root
property int delay: 500
property alias value: root._delayedValue
property alias _actualValue: root.value
property var _delayedValue
@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)
{
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"
@oKcerG
oKcerG / scrolling-indicator.qml
Last active December 13, 2022 22:38
QML Alphabet Scrolling indicator POC
import QtQuick 2.7
import QtQuick.Controls 2.0
ApplicationWindow {
visible: true
width: 640
height: 480
ListView {
id: listView
@oKcerG
oKcerG / ContactList.qml
Last active December 13, 2022 22:38
An experiment trying to recreate Google's Android contact list in QML
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQml 2.2
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
// DEMO VIDEO : https://gfycat.com/WarlikeImportantAmericanrobin
ApplicationWindow {
visible: true