Skip to content

A simple desktop application made using C++, CMake, Qt5, and vcpkg

Notifications You must be signed in to change notification settings

attwoodn/qt-cpp-test-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

         

About

A simple desktop application made using C++, CMake, Qt5, and vcpkg

Topics

Resources

Stars

Watchers

Forks