Skip to content

Instantly share code, notes, and snippets.

View dmitrytoropchin's full-sized avatar

Dmitry Toropchin dmitrytoropchin

View GitHub Profile
@dmitrytoropchin
dmitrytoropchin / Resizer.qml
Created March 22, 2016 07:34
wrapper for manual QtQuick component resizing
import QtQuick 2.3
Item {
id: resizer
property var resizeSource: parent
property rect minimumGeometry: Qt.rect(0, 0, 0, 0)
property rect maximumGeometry: Qt.rect(16777215, 16777215, 16777215, 16777215) // from QtWidgets
@dmitrytoropchin
dmitrytoropchin / UndoManager.qml
Last active October 18, 2022 16:19
simple implementation of undo/redo command stack in QtQuick
import QtQuick 2.3
QtObject {
readonly property bool canUndo: __canUndo()
readonly property bool canRedo: __canRedo()
readonly property string undoText: __undoText()
readonly property string redoText: __redoText()