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.15 | |
import QtQuick.Controls 2.15 | |
import QtQuick.Layouts 1.15 | |
ApplicationWindow { | |
id: window | |
width: 600 | |
height: 600 | |
visible: true | |
title: "colours" |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QQmlComponent> | |
class Bean : public QObject | |
{ | |
Q_OBJECT | |
Q_PROPERTY(qreal roundness READ roundness WRITE setRoundness NOTIFY roundnessChanged) | |
Q_PROPERTY(QStringList sprouts READ sprouts WRITE setSprouts NOTIFY sproutsChanged) |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QLoggingCategory> | |
#include <QDebug> | |
#include <QQuickItem> | |
#include <QQuickWindow> | |
Q_LOGGING_CATEGORY(lcEvents, "hover.events") | |
class EventItem : public QQuickItem |
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
cmake_minimum_required(VERSION 3.5) | |
project(tst_untitled LANGUAGES CXX) | |
enable_testing() | |
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Gui Test Quick) | |
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Test Quick) | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
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
#include <QtWidgets> | |
#include <QDebug> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication app(argc, argv); | |
QMainWindow mainWindow; | |
QWidget *widget = new QWidget; |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QSortFilterProxyModel> | |
#include <QDebug> | |
class MyModel : public QAbstractListModel | |
{ | |
Q_OBJECT | |
public: |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QAbstractProxyModel> | |
#include <QDebug> | |
class MyModel : public QAbstractListModel | |
{ | |
Q_OBJECT | |
public: |
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
#include <QtQuickTest/quicktest.h> | |
#include <QGuiApplication> | |
#include <QQmlContext> | |
#include <QQmlEngine> | |
class MouseDebuggerSetup : public QObject | |
{ | |
Q_OBJECT | |
public: |
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.12 | |
import QtQuick.Controls 2.12 | |
ApplicationWindow { | |
visible: true | |
width: 640 | |
height: 480 | |
Flickable { | |
id: flickable |
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.12 | |
import QtQuick.Controls 2.12 | |
ApplicationWindow { | |
visible: true | |
width: 640 | |
height: 480 | |
Flickable { | |
id: flickable |