QDeclartiveItem-Qt Quick 1 or QQuickItem- Qt Quick 2.
-
Try incorporate qml into qt C
Notice when i add new (c++ class), after entering class name
I get to choose QDeclartiveItem-Qt Quick 1 or QQuickItem- Qt Quick 2.Which one should i choose?
-
It depends on a number of factors, such as the minimum Qt version being targeted, OpenGL capability of the hosting system, use of existing Quick items, and more.
If none of this sounds like an issue (ie Qt 5 minimum, no OpenGL support concerns, starting from scratch), go for Quick 2.
-
It reply, QQuickItem: No Such file or directory.
What should i add in project?i added QT += quick
expected class-name before { token
-
@houmingc Unless you are working on a legacy system where you do not have an opengl context (your machine has to be so old its not funny), use QtQuick2. QtQuick1 AKA QtDeclarative is actually deprecated in Qt 5.5.
-
It's hard to guess without more context, but if you're using Creator, try the "Run qmake" build option before building.