Revert "Try to use quick shapes"
This reverts commit df6b5b22a339173d2a70ed85744b598811c26b30. Doesn't work that easily unfortunately.
This commit is contained in:
parent
4fc76f0d7e
commit
a31b770696
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
#include <QtQuickShapes/private/qquickshape_p.h>
|
|
||||||
|
|
||||||
MainContent::MainContent( QQuickItem *parent ) : QskLinearBox( Qt::Horizontal, parent )
|
MainContent::MainContent( QQuickItem *parent ) : QskLinearBox( Qt::Horizontal, parent )
|
||||||
{
|
{
|
||||||
setSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Expanding );
|
setSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Expanding );
|
||||||
|
|
|
@ -5,38 +5,12 @@
|
||||||
|
|
||||||
#include <QskLinearBox.h>
|
#include <QskLinearBox.h>
|
||||||
|
|
||||||
#include <QtQuickShapes/private/qquickshape_p.h>
|
|
||||||
#include <QtQuick/private/qquickpath_p.h>
|
|
||||||
|
|
||||||
MainWindow::MainWindow() : QskWindow()
|
MainWindow::MainWindow() : QskWindow()
|
||||||
{
|
{
|
||||||
setPreferredSize( { 1024, 600 } );
|
setPreferredSize( { 1024, 600 } );
|
||||||
setTitle( "IOT dashboard" );
|
setTitle( "IOT dashboard" );
|
||||||
|
|
||||||
auto* shape = new QQuickShape( contentItem() );
|
m_mainLayout = new QskLinearBox( Qt::Horizontal, contentItem() );
|
||||||
shape->setSize( { 500, 500 } );
|
m_menuBar = new MenuBar( m_mainLayout );
|
||||||
connect(this, &QQuickWindow::frameSwapped, [shape]() {
|
m_mainContent = new MainContent( m_mainLayout );
|
||||||
shape->setAsynchronous(!shape->asynchronous());
|
|
||||||
qDebug() << "status:" << shape->rendererType() << shape->status();
|
|
||||||
});
|
|
||||||
|
|
||||||
auto* shapePath = new QQuickShapePath( shape );
|
|
||||||
shapePath->setFillColor( Qt::red );
|
|
||||||
shapePath->setStrokeColor( Qt::blue );
|
|
||||||
shapePath->setStrokeWidth( 5 );
|
|
||||||
shapePath->setStartX( 5 );
|
|
||||||
shapePath->setStartY( 5 );
|
|
||||||
|
|
||||||
auto* arc = new QQuickPathArc( shapePath );
|
|
||||||
arc->setX( 50 );
|
|
||||||
arc->setY( 50 );
|
|
||||||
arc->setRadiusX( 100 );
|
|
||||||
arc->setRadiusY( 100 );
|
|
||||||
arc->setUseLargeArc( true );
|
|
||||||
|
|
||||||
qDebug() << "visible?" << shape->isVisible() << shape->size();
|
|
||||||
|
|
||||||
// m_mainLayout = new QskLinearBox( Qt::Horizontal, contentItem() );
|
|
||||||
// m_menuBar = new MenuBar( m_mainLayout );
|
|
||||||
// m_mainContent = new MainContent( m_mainLayout );
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
CONFIG += qskexample
|
CONFIG += qskexample
|
||||||
|
|
||||||
QT += quickshapes-private quick-private
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Card.cpp \
|
Card.cpp \
|
||||||
DaytimeSkin.cpp \
|
DaytimeSkin.cpp \
|
||||||
|
|
Loading…
Reference in New Issue