Skip to content

vladguba/QtShopMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtShopMenu — Beauty Store

A desktop application built with Qt 6.5 / QML that simulates an interactive product menu with a shopping cart.
All business logic is implemented in C++; the UI layer is built entirely in QML.


Features

Product Catalog

  • 10 real cosmetic products with images, names, prices, and descriptions
  • Discounted items are visually highlighted with a distinct background color and a discount badge (e.g. -25%)
  • Star rating and review count for each product
  • Promotion badges: Bestseller, Gift, Free Shipping
  • Clicking a product card opens a modal detail view

Product Detail View

  • Full product description
  • Product image
  • Original / sale price with discount percentage and savings amount
  • Add to Cart button

Shopping Cart

  • List of selected items with thumbnails, names, and prices
  • Quantity per item
  • Subtotal per item
  • Increase / decrease quantity (+ / buttons)
  • Remove individual item
  • Clear Cart button
  • Total item count and order total
  • Savings from item-level discounts
  • Automatic volume discount:
    • 5% off orders over ₴5,000
    • 10% off orders over ₴10,000

Tech Stack

Layer Technology
Language C++ 17
Framework Qt 6.5
UI QML + QtQuick Controls 2
Build system CMake 3.16+
Data JSON (Qt Resource System)
Images PNG (Qt Resource System)

C++ Architecture (Model–View)

cpp/
├── product.h          — Product struct with business methods: hasDiscount, discountPercent, savings
├── cartitem.h         — CartItem struct: Product + quantity, totalPrice, totalSavings
├── productmodel.h/cpp — QAbstractListModel: loads products from products.json
└── cartmodel.h/cpp    — QAbstractListModel: cart logic, Q_INVOKABLE methods, discount calculation

QML Structure

qml/
├── Main.qml                    — main window (header + product grid + cart panel)
├── Theme.qml                   — singleton: colors, icons, helper functions
├── components/
│   ├── ProductCard.qml         — product card in the grid
│   ├── BadgeFlow.qml           — row of promotion badges
│   └── StarRating.qml          — star rating with review count
└── views/
    ├── CartView.qml            — cart side panel
    └── ProductDetail.qml       — product detail modal

Requirements

  • Qt 6.5.2 or later
  • CMake 3.16+
  • C++ 17 compatible compiler (GCC 9+, Clang 10+, MSVC 2019+)

Build & Run

Via Qt Creator

  1. Open CMakeLists.txt in Qt Creator
  2. Select a Qt 6.5 kit
  3. Click BuildRun

Via Command Line

# Clone the repository
git clone https://github.com/<YOUR_USERNAME>/QtShopMenu.git
cd QtShopMenu

# Configure and build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

# Run (Windows)
.\build\Release\appQtShopMenu.exe

Note: make sure Qt 6.5 libraries are available in PATH, or specify the path via -DCMAKE_PREFIX_PATH=/path/to/Qt/6.5.x/<kit>.


Project Structure

QtShopMenu/
├── CMakeLists.txt
├── main.cpp
├── cpp/
│   ├── product.h
│   ├── cartitem.h
│   ├── productmodel.h
│   ├── productmodel.cpp
│   ├── cartmodel.h
│   └── cartmodel.cpp
├── qml/
│   ├── Main.qml
│   ├── Theme.qml
│   ├── components/
│   │   ├── ProductCard.qml
│   │   ├── BadgeFlow.qml
│   │   └── StarRating.qml
│   └── views/
│       ├── CartView.qml
│       └── ProductDetail.qml
├── data/
│   └── products.json
└── images/
    ├── amouage.png
    ├── biorepair.png
    ├── charlotte_highlighter.png
    ├── christina_cream.png
    ├── dove_shower.png
    ├── elseve_serum.png
    ├── laroche_serum.png
    ├── loreal_mascara.png
    ├── pantene.png
    └── whocares_sun.png

About

Interactive shop menu with cart — Qt 6.5 / QML + C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors