4 ms·
Do you actually need QML? What's wrong with "native" widgets? I ask because I use Qt and c++ professionally, and have no use of QML. I could elaborate, but I'm
by usernam 10y ago
Do you actually need QML? What's wrong with "native" widgets?
I ask because I use Qt and c++ professionally, and have no use of QML. I could elaborate, but I'm more interested in why exactly you'd go for QML first.
- nottorp 10y agoYeah, second hand story (as in, personal friends are working with Qt/C++/QML, i've fortunately only used Qt/C++) is that QML mostly gets in the way. It's limited and buggy. Just do everything natively, Qt is truly cross platform and you won't have trouble.
- laurent123456 10y agoIn fact I'd rather use native QWidgets as I find it much easier to work with, however as I understand Qt is now increasingly giving priority to QML so I'm trying to use it for this new project. Also this is a mobile app and it seems Qt Quick is designed for this. I'm curious actually are the apps that you develop meant for mobile devices as well? And if so, how does the QWidgets work on them?
- usernam 10y agoNo, I don't develop for mobile, so I cannot answer there. Exclusively desktop. I know Qt5 is pushing towards QML, but QWidgets aren't going away. In fact, I would consider it to be a big mistake to use QML on desktop. It's much slower and doesn't really save the developer anything: pushing state to the JS layer doesn't you any good if you need to keep it sync with the lower layer as well. It's an extra indirection. It also looks completely out of place in all platforms. QML might be partially useful for drawing on GL surfaces, but again the performance hit will be a huge setback. We use different widget kits for drawing on GL. Since QML and QWidgets are different anyway, there's no reason to stick to it. Also, QML widgets are improving, but they're all still qualitatively inferior from an user/usage perspective.