https://github.com/attwoodn/qt-cpp-test-app
A simple desktop application made using C++, CMake, Qt5, and vcpkg
https://github.com/attwoodn/qt-cpp-test-app
cmake cpp qt qt5 simple vcpkg
Last synced: 4 months ago
JSON representation
A simple desktop application made using C++, CMake, Qt5, and vcpkg
- Host: GitHub
- URL: https://github.com/attwoodn/qt-cpp-test-app
- Owner: attwoodn
- Created: 2023-08-30T23:24:40.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-16T01:18:21.000Z (over 1 year ago)
- Last Synced: 2025-01-04T14:43:30.128Z (5 months ago)
- Topics: cmake, cpp, qt, qt5, simple, vcpkg
- Language: C++
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Qt C++ Test App
A simple desktop application made using C++ and Qt5.
For this project, my goal was to learn:
* using vcpkg for installing C++ library dependencies;
* creating UI elements in QtCreator and using them in C++ code; and
* integrating Qt project files into CMake builds.## Installing Dependencies
To install the project dependencies, please run the following commands in the project root directory:
```
# initialize the vcpkg submodule
git submodule update --init# install vcpkg dependencies
sudo apt install -y curl pkg-config python3-distutils# install qt5 dependencies
sudo apt install -y '^libxcb.*-dev' libx11-xcb-dev libgl1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev# build vcpkg without information collection
./vcpkg/bootstrap-vcpkg.sh -disableMetrics# install qt5
./vcpkg/vcpkg install qt5-base
```## Building and Running the App
Once the project dependencies have been installed, the app can be built and run by executing the following commands from the project root directory:
```
# build the Qt Test App
mkdir build && cd build
cmake ..
make# run the Qt Test App
./bin/main
```## Using the App
Fill in your first and last name, and select your favorite fruit from the drop-down menu (apples, bananas, oranges). When the given user input is determined to be valid, the `Say Hello` button becomes enabled. Pressing the `Say Hello` button outputs a message to the text box below.
![]()
![]()