Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    OpenGL setup for iOS using Qt 5.4 issues [SOLVED]

    Mobile and Embedded
    2
    10
    1875
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kloveridge last edited by

      I've updated to Qt 5.4 and now I'm back to refighting some battles with just basic openGL setup on the iOS device.

      I'm writing a tool that has two parts: a QPlainTextEdit window and a OpenGL window below it (which previously was a QGLWidget). both of these widgets are parented to a QVBoxLayout. Everything has been find in Qt 5.3.

      In Qt 5.4, all my openGL stuff is broken.

      So I turned to the examples that claim to work on iOS. The only example that works is the OpenGL Window Example. The one with the multi-colored spinning triangle. But it uses an implementation that I'm unfamiliar with. It uses a QWindow. Since its not a widget, I can't parent it to the QVBoxLayout.

      All other examples use a QOpenGLWidget. Which it complains is not compatible with the iphone.

      Any advice?

      1 Reply Last reply Reply Quote 0
      • K
        kloveridge last edited by

        I just discovered what my issues were. When I upgraded to Qt 5.4, I was still building with the Qt 5.3 projects. I just threw them away and readded iphone and android to my project and everything is fine with my original QGLWidget design. Phew! dodged a bullet for now.

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          Glad you found out and thanks for sharing ! Can you also update the thread title prepending [solved] so other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • K
            kloveridge last edited by

            I might have spoke premature. I seem to have reactivated the problem somehow and I can't fix it again.

            My project has two library projects. For some reason, the make file file keeps insisting that these two libraries get compiled using the ios 7.1 sdk. Here's the line from the make file:

            @-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk@

            Where does the 7.1 library get set?! Its supposed to be the 8.1 library. The main project file compiles using 8.1.

            1 Reply Last reply Reply Quote 0
            • K
              kloveridge last edited by

              Its definitely linked to this SDK issue. My theory is I've checked in some file that tells the make command to use the 7.1 library. I've just went through the project and deleted all build files and it compiled with 8.1.

              I suspect when I did a merge, I reintroduced the file that tells Qt to use the 7.1 sdk. When I find it, I'll post my findings.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Got any .pro.user in your repository ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • K
                  kloveridge last edited by

                  I do. But they are not checked into the repository. They are just sitting in the folder.

                  1 Reply Last reply Reply Quote 0
                  • K
                    kloveridge last edited by

                    actually a whole bunch of them. Also, it appears that the file that kept on adding the 7.1 sdk was a file called .qmake.stash. When I deleted it, Qt rebuilt it and the 7.1 issue went away

                    1 Reply Last reply Reply Quote 0
                    • K
                      kloveridge last edited by

                      Okay, now I think I've solved the problems. The fix was I had to delete the .qmake.stash file in every sub dir projects. In my particular case, I had my main application with two sub projects. Each of those files had a .qmake.stash file. When I opened that file, it showed it was inserting the 7.1 sdk.

                      Once Qt rebuilt the project, it made new corrected .qmake.stash files in their respective projects.

                      One note about .qmake.stash is its normally hidden. So if you don't see it, you will need to show hidden files.

                      Here's a good article on how to make hidden files show up on your Mac: "here":http://osxdaily.com/2009/02/25/show-hidden-files-in-os-x/

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        .pro.user file contains the configuration of Qt Creator for you project e.g. the Qt version and kit

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post