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:\ProgramFiles (x86)\ on Windows. To change the path, specify
-DCMAKE_INSTALL_PREFIX=/your/path
# Add include path
INCLUDEPATH += $$PWD/thirdparty/qplotmarker/include
# Link static library
LIBS += -L$$PWD/thirdparty/qplotmarker/lib -lqplotmarker
# OR compile sources directly (if needed)
SOURCES += $$PWD/thirdparty/qplotmarker/src/*.cpp
HEADERS += $$PWD/thirdparty/qplotmarker/include/*.h
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.1.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.
- 📦 Format: Documentation provided in Qt Compressed Help (.qch) format, viewable in Qt Assistant.
- 📂 Main File:
qplotmarker.qch
– QPlotMarker module documentation. - ⚙️ Integration: Two methods supported (GUI or command-line).
Get the .qch
file from the repository:
🔗 docs/ in qplotmarker
- Launch Qt Assistant (
assistant
in terminal). - Go to: Edit → Preferences → Documentation → Add....
- Select
qplotmarker.qch
. - Click OK – docs will appear in the content tab.
assistant -register qplotmarker.qch
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
Miniature | Description |
---|---|
Base Example |
|
Inverted Markers Invert horizontal and vertical marker |
|
PlotMarker Distance Coord difference between markers |
|
Show Coord Marker Displays the coordinates of the intersection points |
|
Grouping Markers Grouping markers for synchronous movement |
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!