diff --git a/src/pybind11-qt/pybind11_qt_basic.cpp b/src/pybind11-qt/pybind11_qt_basic.cpp index b8f19f1..c6a7cc6 100644 --- a/src/pybind11-qt/pybind11_qt_basic.cpp +++ b/src/pybind11-qt/pybind11_qt_basic.cpp @@ -39,19 +39,7 @@ namespace pybind11::detail { PyObject* objPtr = src.ptr(); if (!PyBytes_Check(objPtr) && !PyUnicode_Check(objPtr)) { -#ifndef PYBIND11_QT_QSTRING_NOFS - // try converting from os.PathLike - type_caster path_caster; - if (!path_caster.load(src, implicit)) { - return false; - } - - value = qstring_from_stdstring((*path_caster).native()); - return true; -#else - // do not try to convert from os.PathLike return false; -#endif } // Ensure the string uses 8-bit characters