Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
25
-
Foundation PM Staging
Description
Hi,
Currently it's quite an exercise to use a third party library that uses the std::ifstream/std::ofstream (for respectively reading and writing) as Qt doesn't have any mappings to them from QFileDevice.
Or perhaps even from QIODevice, though that might be a stretch.
An example library that comes to mind is the splendid nlohmann json library. The library itself is quite easy to use, but hooking it into Qt (for instance in QSettings) is... challenging.
Note: ignore the fact that Qt has it's own JSON parsing classes. That is not the point of this request nor the example.
There are ways to get to an std::streambuf object, but that requires quite a bit of boilerplate code.
Having this would just make it one more step easier to use external libraries in Qt.
Cheers,
Mark
Attachments
Issue Links
- relates to
-
QTBUG-103246 Qt should have a QIo like what KIO is. But much much better
-
- Open
-