Volker Hilsheimer 2b9d021ba5 Minor updates to the "Touch Knobs" example
Turn on anti-aliasing, and update screenshot.

The example is still not great and under-documented, but at least it
doesn't look horrible anymore.

Pick-to: 6.7 6.6
Task-number: QTBUG-120291
Change-Id: Ie709cb51d64c535d7cd0aa1451b3c5bb901324cb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-20 17:59:18 +01:00

29 lines
635 B
C++

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QApplication>
#include <QGraphicsView>
#include "knob.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
QGraphicsView view(&scene);
view.setRenderHints(QPainter::Antialiasing);
Knob *knob1 = new Knob;
knob1->setPos(-110, 0);
Knob *knob2 = new Knob;
scene.addItem(knob1);
scene.addItem(knob2);
view.showMaximized();
view.fitInView(scene.sceneRect().adjusted(-20, -20, 20, 20), Qt::KeepAspectRatio);
return app.exec();
}