This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub link in Qt.io Documentation | |
// @namespace http://grecko.fr/ | |
// @version 0.4.1 | |
// @description Add a link to view the source of a class/component on Qt.io documentation pages. | |
// @author GrecKo | |
// @match http://doc.qt.io/* | |
// @match https://doc.qt.io/* | |
// @match http://doc-snapshots.qt.io/* | |
// @match https://doc-snapshots.qt.io/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef QQMLOBJECTLISTMODEL_H | |
#define QQMLOBJECTLISTMODEL_H | |
#include "qqmlmodels.h" | |
#include <QByteArray> | |
#include <QChar> | |
#include <QDebug> | |
#include <QHash> | |
#include <QList> | |
#include <QMetaMethod> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.2 | |
pragma Singleton | |
QtObject { | |
signal openItem(id) | |
signal removeItem(id) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connections { | |
target: AppActions | |
onOpenItem: { | |
/// Create new window and open item | |
} | |
onAskToRemoveItem: { | |
/// Open a dialog | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system(/usr/local/bin/qpm install) { | |
include(vendor/vendor.pri) | |
} else { | |
QPM_URL = https://qpm.io | |
equals(QMAKE_HOST.os, "Darwin") : system(open $$QPM_URL) | |
equals(QMAKE_HOST.os, "Windows") : system(start $$QPM_URL) | |
error(qpm is not installed in PATH) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtQuick.Window 2.2 | |
Item { | |
id: root | |
readonly property alias dragging: mouseArea.pressed | |
property bool lol: true | |
property Window targetWindow: lol ? win2 : window1 | |
implicitWidth: draggable.childrenRect.width | |
implicitHeight: draggable.childrenRect.height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function descendant() { | |
var object = arguments[0]; | |
for (var i = 1; i < arguments.length; ++i) | |
object = object.children[arguments[i]]; | |
return object; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sections = document.querySelectorAll(".sg-section"); | |
var ul = document.createElement('ul'); | |
sections[0].parentNode.insertBefore(ul, sections[0]); | |
for (var i=0; i < sections.length; ++i) { var elem = sections[i].children[0]; var li = document.createElement('li'); li.innerHTML='<a href="#'+elem.id+'">'+elem.textContent+'</a>'; ul.appendChild(li); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
Item { | |
id: root | |
height: 0 | |
default property alias data: contentItem.data | |
property ListView _listView: parent.parent | |
property Item _adjacentItem: { _listView.contentY; return _listView.itemAt(0, y); } | |
property bool _adjacentItemIsLastOfSection: _adjacentItem ? _adjacentItem.ListView.section !== _adjacentItem.ListView.nextSection && _adjacentItem !== _listView.contentItem.children[0] : false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
/*! | |
\qmltype AreaTester | |
\brief A component that highlights the aera of a given component. | |
The AreaTester component is a simple component to troubleshoot what area occupies an other component. | |
You can use this component like this to highlights its parent's area. | |
\qml | |
Item { | |
id: itemToHighlight |
OlderNewer