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
#include <QtWidgets> | |
class RectItem : public QGraphicsRectItem | |
{ | |
public: | |
RectItem() | |
{ | |
setRect(0, 0, 40, 40); | |
} | |
}; |
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
#include <QtWidgets> | |
class Widget : public QWidget | |
{ | |
public: | |
Widget(QWidget *parent = 0) : | |
QWidget(parent) | |
{ | |
resize(300, 300); | |
} |
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
#include <QtQuickTest/quicktest.h> | |
QUICK_TEST_MAIN(untitled) |
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
cmake_minimum_required(VERSION 3.16) | |
project(model VERSION 0.1 LANGUAGES CXX) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) | |
qt_standard_project_setup(REQUIRES 6.5) |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QQmlContext> | |
#include <QQuickPaintedItem> | |
#include <QPainter> | |
class PaintedItem : public QQuickPaintedItem | |
{ | |
Q_OBJECT | |
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) |
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
#include <QtTest> | |
class Untitled : public QObject | |
{ | |
Q_OBJECT | |
public: | |
Untitled(); |
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.9 | |
import QtQuick.Controls 2.2 | |
// A small demo app for "correct" isometric rendering according to the following explanation: | |
// https://github.com/clintbellanger/flare/issues/461 | |
// The code is hacky. | |
ApplicationWindow { | |
id: window |
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.9 | |
import QtQuick.Controls 2.0 | |
import QtQuick.Layouts 1.3 | |
ApplicationWindow { | |
id: window | |
visible: true | |
width: 800 | |
height: 600 |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QScreen> | |
#include <QDebug> | |
int main(int argc, char *argv[]) | |
{ | |
#if defined(Q_OS_WIN) | |
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | |
#endif |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QDebug> | |
#include <QKeyEvent> | |
class KeyListener : public QObject | |
{ | |
Q_OBJECT | |
public: |
OlderNewer