3 ms·
Qt's nice, but the thing I've always disliked about it is that it re-implements all these basic types, like QString, QVector, QList, QMap, etc. and you need to
by ryandrake 10y ago
Qt's nice, but the thing I've always disliked about it is that it re-implements all these basic types, like QString, QVector, QList, QMap, etc. and you need to use them to interact with all their APIs. So, you either have to decide you're all-in on Qt and have these QThis and QThat types littered all over your code (making it more difficult to interact with other third party libraries like boost that know nothing about Qt, or you need to agree on a boundary between your non-Qt-specific code and your UI, and maintain a layer that converts to and from standard types.
- JBReefer 10y agoShouldn't you always have a layer between your business logic and display logic? Seems like this shouldn't be an issue with proper MVVM.
- electroly 10y agoSure, but you still have to write that display layer. You're just moving it around on your plate. You still have to eat it.
- api 10y agoThis is common in older C++ projects that predate good quality STL and good compilers everywhere. They should factor it out, but that would break a ton of code.
- watmough 10y agoYeah, so sad, it just makes me think of all the code that could be cross-platform but for CString (MFC) and the like scattered through it.
- gusmd 10y agoI'm working on a Qt project, and our convention is to have a pure C++ back-end (i.e., STL), but use QObjects everywhere on the Models, Views and Controllers (as per Qt's MVC pattern). That way we can one day re-implement the UI if needed and keep the same "pure" C++ back-end. This has worked fine for us so far.
- steaminghacker 10y ago+1. that's exactly what I do.