Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

C/C++ • Re: first C++ Qt setup

$
0
0
Summary
( verified again new clean setup )
RPIOS desktop 64bit comes preinstalled with:

g++
gcc version 14.2.0 (Debian 14.2.0-19)
make
GNU Make 4.4.1
so with 2 project files
makefile ( must use [tab] instead spaces [ ][ ][ ] )
hello_world.cpp
and the command
make
g++ hello_world.cpp -o hello_world
can make a C++ terminal app ( without any installation )
and to run it by call the created target:
./hello_world
get a text in that terminal.

for GUI app ( Qt6 C++ ) and
if have external source code example ( like above AndyD: qtsize )
need:

Code:

sudo apt install cmake qt6-base-dev qt6-wayland
cmake ..
make
./qtsize


but sure you want design your own app like with:

Code:

sudo apt install qtcreator
( better restart )
[menu] [Programming] [QT Creator]
[Create Project] [Application (Qt)] [Qt Widgets Application] [Choose]
Location: 'qtstart' /home/pi/Projects/CPP [default yes] [Next]
[Next][Next][Next][Next][Next][Finish]
[build][Run]
get a terminal window and a empty app window

now try
[Forms] [mainwindow.ui] double click to open in Design Mode

Statistics: Posted by PiPlay — Sat Feb 14, 2026 9:28 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles