From ffb59345971393ccc54a0a8b5581745e4173577c Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sat, 13 Jan 2024 10:07:53 +0100 Subject: [PATCH] first-application steps modified --- .../03-writing-your-first-application.asciidoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/tutorials/03-writing-your-first-application.asciidoc b/doc/tutorials/03-writing-your-first-application.asciidoc index 209e98cf..24e86a27 100644 --- a/doc/tutorials/03-writing-your-first-application.asciidoc +++ b/doc/tutorials/03-writing-your-first-application.asciidoc @@ -10,7 +10,7 @@ layout: docs === Building the QSkinny repository -In this chapter we will write a simple QSkinny application on Linux from scratch. +In this chapter we will write a simple QSkinny application on Linux from scratch in C++. As a prerequisite, a recent Qt version (>= 5.15) should be available. On debian bullseye we need to install these packages `build-essential cmake qtbase5-dev qtbase5-private-dev qtdeclarative5-dev qtdeclarative5-private-dev libqt5svg5-dev`. On Debian these packages need to be installed for Qt6: `build-essential cmake @@ -74,14 +74,13 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -find_package(Qt5 REQUIRED COMPONENTS Widgets Quick) +find_package(Qt5 REQUIRED COMPONENTS Quick) find_package(QSkinny REQUIRED) add_executable(myapp src/main.cpp) target_link_libraries(myapp PRIVATE - Qt5::Widgets Qt5::Quick Qsk::QSkinny) .... @@ -122,9 +121,9 @@ int main( int argc, char* argv[] ) { QGuiApplication app( argc, argv ); - auto* horizontalBox = new QskLinearBox( Qt::Horizontal ); - auto* button1 = new QskPushButton( "button 1", horizontalBox ); - auto* button2 = new QskPushButton( "button 2", horizontalBox ); + auto horizontalBox = new QskLinearBox( Qt::Horizontal ); + (void) new QskPushButton( "Button 1", horizontalBox ); + (void) new QskPushButton( "Button 2", horizontalBox ); QskWindow window; window.addItem( horizontalBox );