1
votes

I have a problem with including QQuickWindow into Qt application.

I am integrating Qml into Qt application that wasn't build by me. That was successfully so far. I added

QT += qml quick 

into my project file. Also I included

#include <QtQml>
#include <QQuickView>

into main cpp.

And then I used QQmlApplicationEngine to load Qml code. And that worked great.

But since last build, Qt Application was changed and I can't include QQuickView or QtQuick anymore.

I got some errors that I don't see how they are connected with my problem. Like:

 C2371: 'int32_t' : redefinition; different basic types

or

 C2375: 'ioctlsocket' : redefinition; different linkage

A lot of errors like that. So I am stuck with this. Any help would be appreciated.

And I am using Qt 5.3.1 (MSVC 2010, 32 bit)

Thanks.

2

2 Answers

3
votes

I had this problem today. Thought maybe someone will get this problem, here is how I go around it:

#include <QtQuick/QQuickView>
#include <QtQuick/QQuickItem>
1
votes

It looks like your project have some other dependencies which are not related to Qt. It's not enough information to tell exactly what's wrong, but this kind of errors might pop up when you include windows.h before Winsock2.h somewhere in your code.