PacktPublishing / Mastering-Qt-5

Code repository for Mastering Qt 5 published by Packt
MIT License
206 stars 86 forks source link

Snake game issues #4

Closed craigusr closed 6 years ago

craigusr commented 7 years ago

I tried building/running Chapter 06 Snake in Qt 5.9.1 and 5.6.2 and got different issues. It appears to be due to the "tech preview" instability of the Qt3D Extras module.

In 5,9,1 I had to do this to get Apple.qml to load:

// Apple.qml PhongMaterial { id: material diffuse: "red" }

// DiffuseMapMaterial { // id: material // diffuse: "qrc:/models/apple-texture.png" // }

In 5.6.2 just downloaded using the Qt Maintenance tool, the qt3dextras module is not found.

In both versions the grass is not displayed (black background)

GuillaumeLazar commented 7 years ago

Many changes seems to have been done to the Qt 3D module in 1 year. You right about the "tech preview" instability of the Qt3D module that is since Qt 5.9, inside the Qt release...

Two solutions:

  1. Build Qt and Qt 3D TP module from the sources (branch 5.7). Check http://doc.qt.io/qt-5/build-sources.html and http://code.qt.io/cgit/ )
  2. Update the project code source to fit the changes of Qt 3D in Qt 5.9.1
craigusr commented 7 years ago

Hi,

I was working on solution 2 to offer a solution but have not yet figured it out. Other similar examples seem to work.

Good book.

Thanks, Craig


From: Guillaume Lazar notifications@github.com<mailto:notifications@github.com> Sent: Sunday, August 20, 2017 3:06 AM Subject: Re: [PacktPublishing/Mastering-Qt-5] Snake game issues (#4) To: PacktPublishing/Mastering-Qt-5 mastering-qt-5@noreply.github.com<mailto:mastering-qt-5@noreply.github.com> Cc: Craig Cuthbert craigusr@hotmail.com<mailto:craigusr@hotmail.com>, Author author@noreply.github.com<mailto:author@noreply.github.com>

Many changes seems to have been done to the Qt 3D module in 1 year. You right about the "tech preview" instability of the Qt3D module that is since Qt 5.9, inside the Qt release...

Two solutions:

  1. Build Qt and Qt 3D TP module from the sources (branch 5.7). Check http://doc.qt.io/qt-5/build-sources.html and http://code.qt.io/cgit/ )
  2. Update the project code source to fit the changes of Qt 3D in Qt 5.9.1

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PacktPublishing/Mastering-Qt-5/issues/4#issuecomment-323575601, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL8LF1yNrBsQqPde5aexEDxSyxa-d9Cgks5saAU7gaJpZM4O8Bdx.

GuillaumeLazar commented 7 years ago

Please check:

GuillaumeLazar commented 6 years ago

Code updated for Qt 5.10.1 in 06e3493.