Skip to content

Repository files navigation

Info

A project template at first for projects using c++ for core logic and the qt library with html, css and javascript for the interface along with postgres for the database.

The projects tech stack and structure └── MyApp/ ├── CMakeLists.txt │ ├── src/ │ ├── main.cpp │ ├── backend.cpp │ └── backend.h │ ├── qml/ │ └── main.qml ← creates window + Qt WebView │ └── web/ ├── index.html ← UI structure ├── styles.css ← UI design └── app.js ← UI logic

Setup

Requirements

Install the following before building:

  • Git
  • CMake
  • GCC / MinGW-w64
  • mingw32-make
  • vcpkg

Verify:

git --version
cmake --version
gcc --version
g++ --version
mingw32-make --version

Install vcpkg

vcpkg only needs to be installed once:

cd C:\dev

git clone https://github.com/microsoft/vcpkg.git

cd vcpkg

.\bootstrap-vcpkg.bat

Set the VCPKG_ROOT environment variable to:

C:\dev\vcpkg

Verify:

vcpkg version

Clone the project

git clone <repository-url>
cd MyApp

Project dependencies

C++ dependencies are declared in:

vcpkg.json

Currently:

qtbase
qtdeclarative

These provide Qt Core, GUI, QML, Qt Quick and Qt Quick Controls required by the application.

Install dependencies

From the project root:

vcpkg install --triplet x64-mingw-dynamic

vcpkg installs the dependencies into the project's:

vcpkg_installed/

Alternatively, when using the provided CMake preset, CMake can automatically ask vcpkg to install missing dependencies during configuration.

Configure

cmake --preset gcc

The project uses:

Compiler:   GCC / MinGW-w64
Generator:  MinGW Makefiles
vcpkg:      x64-mingw-dynamic

Build

cmake --build build

Run

After a successful build:

.\build\MyApp.exe

Development workflow

After initially setting up the project, the normal workflow is simply:

cmake --preset gcc
cmake --build build
.\build\MyApp.exe

If vcpkg.json changes, install/update the dependencies with:

vcpkg install --triplet x64-mingw-dynamic

About

A project for testing a tech stack using c++ along with qt with simple html, css and javascript for the interface and postgres for the database.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages