This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.7 | |
| import QtQuick.Controls 2.0 | |
| ApplicationWindow { | |
| visible: true | |
| width: 640 | |
| height: 480 | |
| ListView { | |
| id: listView |
OlderNewer