QPlotMarker – an interactive marker for QChart (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.
You must have installed project dependencies
- Clone repository
git clone https://github.com/Mark194/qplotmarker
- Go to directory
cd qplotmarker
- Create and go to the build directory
mkdir build
cd build
- Project configuration via CMake
cmake ..
If you need to specify a specific generator, use
cmake -G "Visual Studio 17 2022" ..
If you want to configure the library as static, add the option
-DBUILD_SHARED_LIBS=OFF
- Build project
cmake --build .
- Installing the library into the system
cmake --install .
By default, installation goes to /usr/local/ on Linux/macOS or C:\Program Files (x86)\ on Windows. To change the path, specify
-DCMAKE_INSTALL_PREFIX=/your/path
INCLUDEPATH += $$PWD/thirdparty/qplotmarker/include
LIBS += -L$$PWD/thirdparty/qplotmarker/lib -lqplotmarker
SOURCES += $$PWD/thirdparty/qplotmarker/src/.cpp HEADERS += $$PWD/thirdparty/qplotmarker/include/.h
cmake
find_package(qplotmarker REQUIRED)
target_link_libraries(your_target PRIVATE qplotmarker::qplotmarker)
# For header files
target_include_directories(your_target PRIVATE
path/to/qplotmarker/include
)
# For static library
target_link_libraries(your_target PRIVATE
path/to/qplotmarker/lib/libqplotmarker.a
)
# Or for shared library
target_link_libraries(your_target PRIVATE
path/to/qplotmarker/lib/libqplotmarker.so
include(FetchContent)
FetchContent_Declare(
qplotmarker
GIT_REPOSITORY https://github.com/Mark194/qplotmarker.git
GIT_TAG v1.0.0
)
FetchContent_MakeAvailable(qplotmarker)
target_link_libraries(your_target PRIVATE qplotmarker)
If you have any difficulties or questions about using the package, create a discussion in this repository or write to email
- Qt Core: Version 5.15.2+ or 6.4.2+
- Required Modules:
QtCharts
(for plotting functionality)QtSvg
(for SVG support)
- Compiler:
- Qt5: GCC 7+, Clang 6+, MSVC 2017 (v19.16+)
- Qt6: GCC 9+, Clang 10+, MSVC 2019 (v19.28+)
- Additional Notes:
- On Windows: MSVC is recommended (MinGW may have issues with QtCharts)
- On macOS: Xcode 12+ required for Qt6
- On Linux: Install
libgl1-mesa-dev
and other development tools
Found compatibility issues? Please report in Issues.
Ready-to-use code examples are available in the examples folder. These demonstrate:
- Basic usage of plotting functionality
- Advanced marker customization
- Integration with Qt widgets
We would like to express our special gratitude to ShonZelno for their valuable contributions to this project, including:
- Active participation in development and testing
- Suggesting innovative ideas and improvements
- Helping to identify and fix critical issues
Your involvement made this library significantly better!