Try out LVGL Pro - A complete toolkit to build, test, share, and ship UIs efficiently!
LVGL
Tutorial

Running LVGL PC Simulator in Qt Creator on Windows

Step-by-step guide to setting up the LVGL PC simulator with Qt Creator 4.8.0 and MinGW 64-bit compiler on Windows 10.

PusillusPusillus3 min read

Qt Creator is a powerful IDE that makes it easy to manage non-Qt projects. With the latest release Qt 5.12.0, GCC x64 compiler support for Windows is also included. This step-by-step tutorial shows how to run the LVGL PC simulator in Windows 10 from Qt Creator 4.8.0 with the MinGW 64-bit compiler.

Requirements#

Copy SDL2 Libraries#

  • In the pc_simulator folder, create a subfolder named SDL2.
  • Copy SDL header files there.
  • Create an SDL2/lib subfolder and copy libraries for i686-w64 from the SDL2 package.

Setting up Qt Creator Project#

  • Open Qt Creator
  • From the File menu, select New File or Project.
    • In the form, select Non-Qt Project and Plain C Application. Press Choose button.
Qt Creator new project dialog
Qt Creator new project dialog
  • In the project management form:
    • Location: Select project directory location and type a project name (e.g., pc_sim). Press Next button.
    • Build System: Select qmake. Press Next button.
    • Kits: Select MinGW 64-bit. Press Next button.
    • Summary: Press Finish button.
Qt Creator plain C application setup
Qt Creator plain C application setup

A new subfolder is created with pc_sim.pro, pc_sim.pro.user, and main.c template.

  • Close the project from Qt Creator.
  • Move pc_sim.pro and pc_sim.pro.user to the main directory. Remove the pc_sim subfolder.
  • From Qt Creator: open project pc_sim.pro. Edit file pc_sim.pro and remove these two lines:
SOURCES += \
      main.c
Removing template source files
Removing template source files
  • Save the project.
  • In the Projects pane: right-click on the pc_sim project and select Add Existing Directory from the menu.
Adding existing directory to project
Adding existing directory to project

All source files and includes should be already selected by default.

  • From the file list: deselect the lv_examples and SDL2 folders. Then add only .c and .h files from the lv_examples/demo folder.
Selecting files to include in project
Selecting files to include in project
  • Edit pc_sim.pro and add these lines to add SDL2 library and includes to the project:
LIBS += -L$$PWD/SDL2/lib/ -lmingw32 -lSDL2main -lSDL2
 
INCLUDEPATH += $$PWD/SDL2
DEPENDPATH += $$PWD/SDL2
Adding SDL2 library paths
Adding SDL2 library paths
  • Save the project.

Build and Run the Project#

  • Select Release build from the left panel icon.
Selecting release build configuration
Selecting release build configuration
  • Run the demo
LVGL demo running in Qt Creator PC simulator
LVGL demo running in Qt Creator PC simulator

Qt Creator is available for Linux and macOS as well. Adapting the LVGL PC simulator project on these operating systems should be straightforward.

The complete project is available at this GitHub repository: https://github.com/ScarsFun/pc_simulator

About the author

Pusillus
Pusillus

Community Contributor

Embedded hobbyist and LVGL community contributor who enjoys building projects with microcontrollers.

Meet the people behind the blog

Discover the talented writers sharing their knowledge about LVGL

View Authors

Subscribe to our newsletter to not miss any news about LVGL. We will send maximum of 2 mails per month.

LVGL

LVGL is the most popular free and open source embedded graphics library targeting any MCU, MPU and display type to build beautiful UIs.

We also do services like UI design, implementation and consulting.

© 2026 LVGL. All rights reserved.
YouTubeGitHubLinkedIn