first-application steps modified
This commit is contained in:
parent
7e2e361637
commit
ffb5934597
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user