diff --git a/crates/cxx-qt-lib/src/gui/qpainterpath.rs b/crates/cxx-qt-lib/src/gui/qpainterpath.rs index 4161c3362..e9a6c621b 100644 --- a/crates/cxx-qt-lib/src/gui/qpainterpath.rs +++ b/crates/cxx-qt-lib/src/gui/qpainterpath.rs @@ -4,6 +4,7 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 use crate::QPointF; use cxx::{type_id, ExternType}; +use std::fmt; use std::mem::MaybeUninit; #[cxx::bridge] @@ -192,6 +193,10 @@ mod ffi { #[doc(hidden)] #[rust_name = "qpainterpath_eq"] fn operatorEq(a: &QPainterPath, b: &QPainterPath) -> bool; + + #[doc(hidden)] + #[rust_name = "qpainterpath_to_qstring"] + fn toQString(value: &QPainterPath) -> QString; } } @@ -232,6 +237,12 @@ impl PartialEq for QPainterPath { } } +impl fmt::Display for QPainterPath { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", ffi::qpainterpath_to_qstring(self)) + } +} + impl Eq for QPainterPath {} // Safety: