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.
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
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
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.