Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. UI of my application is weird with Qt 4/5 on OS X 10.11 El Capitan

UI of my application is weird with Qt 4/5 on OS X 10.11 El Capitan

Scheduled Pinned Locked Moved Unsolved General and Desktop
xcodeqt5qt4el capitanosx 10.11
12 Posts 3 Posters 4.7k Views
  • 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 18 Nov 2015, 22:07 last edited by
    #3

    Hi and welcome to devnet,

    You can disable C++11 so it will link to libstdc++.

    CONFIG -= c++11
    

    Other than that Qt 4's last official release supports OS X 10.10, it should work on 10.11 but there's no guarantee as the level of support since Apple is making subtle changes each time.

    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
    0
    • M mcosta
      18 Nov 2015, 22:01

      Hi and welcome to devnet,

      would be great to have and example of your code and some images showing the issue.

      This happens only for this project or also for some other projects (for instance an example one)?

      D Offline
      D Offline
      DEADBEEF
      wrote on 19 Nov 2015, 12:32 last edited by
      #4

      Thank you for your welcoming messages.

      @mcosta unfortunately I won't be able to show example of code because the application is about 500 000 lines and as I'm new in the company (and Qt) I don't know where the problem comes from. So if you have an idea of what part of Qt could be responsible of this, I could investigate and show you an example of this part. But basically it's "I've a code which works perfectly on all the mac os x version, when the app is launched on el capitan everything is collapsing".

      Concerning the image, as I work for a company I would prefer to not share it. But it's simple to see. Imagine you have a windows with some buttons centred. Once it's launched on el capitan some buttons will disappear and other will be moved.

      @SGaist How can I do this in Xcode? In my project Build Settings I can set the "C++ standard library" to libc++ or libstdc++. Is it what you're talking about?
      The problem is if I use libstdc++ I get the problem I linked problem-with-qt-5-5 where the solution is to use libc++ but if I do that I couldn't use <tr1/tulpe> anymore...

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DEADBEEF
        wrote on 19 Nov 2015, 17:13 last edited by
        #5

        I almost manage to compile after changing some include with <QtWidgets> and my moc script from
        "moc ${INPUT_FILE_PATH} -f -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
        to "moc ${INPUT_FILE_PATH} -f ${INPUT_FILE_PATH} -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
        I don't understand why I needed to add a path after -f because it's said in the doc that the path is optional...

        But now WOW I've 600 errors! I don't know if hell exists but I think it could look like my project! ahah. The "good" new is that it's always the same error, here is a template
        "Undefined symbols for architecture x86_64:
        "ClassName::MethodName( various stuff like std::__1::vector<std::__1::queue<float, blabla)", referenced from: -[ClassName MethodName] in FileName.o"

        Does anybody know what it means?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on 19 Nov 2015, 17:17 last edited by
          #6

          Sorry,

          but we don't have a crystal ball; if we can't see your code (and also seems you use a custom Makefile) we can't help you so much.

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          D 1 Reply Last reply 20 Nov 2015, 11:41
          0
          • M mcosta
            19 Nov 2015, 17:17

            Sorry,

            but we don't have a crystal ball; if we can't see your code (and also seems you use a custom Makefile) we can't help you so much.

            D Offline
            D Offline
            DEADBEEF
            wrote on 20 Nov 2015, 11:41 last edited by
            #7

            @mcosta I totally understand your thoughts and I'm sorry if I expressed myself poorly but the thing is I' totally new on this project and I know nothing about Qt. That are the reason why I may seem lost.
            Furthermore I agree with you that without any code you couldn't help me (or others people who could have the same problems) and I'm glad that you took time to give me some answers. But the thing is that I've 500 000 lines so I just don't know what to show you.

            The only error I got now is "Undefined symbols for architecture x86_64:
            "ClassName::MethodName( parameters)", referenced from: -[ClassName MethodName] in FileName.o" "

            Maybe if you already saw this kind of error in Qt I could see in the code and show you the concerned part

            By the way, as I discover Qt at the same time, I saw in the project a file named FindQt.cmake and inside it only talksabout Qt3 and Qt4. I guess i need to write a cmake for Qt5, no?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on 20 Nov 2015, 12:55 last edited by
              #8

              Hi,

              about CMake with Qt5 you can read this page.

              about the linking error, seems some missing linked libraries

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              D 1 Reply Last reply 25 Nov 2015, 10:52
              0
              • M mcosta
                20 Nov 2015, 12:55

                Hi,

                about CMake with Qt5 you can read this page.

                about the linking error, seems some missing linked libraries

                D Offline
                D Offline
                DEADBEEF
                wrote on 25 Nov 2015, 10:52 last edited by
                #9

                @mcosta Thank you for the links.
                I took some time to reply because I wanted to be sure about something.

                I find the real reason about my problem:the build of my libraries. Indeed, some of our in-house libraries are build with libstdc++ and other with libc++. I cannot change this thing for the moment unfortunately. As the version of qt5 that I use prompts me to build in libc++, I get a lot of link error.

                So my question is: is it possible to use a version of qt5 builded with libstdc++ ? If not, how could pass through the error no type named 'u16string' in namespace 'std' in qstring.h, using libstdc++ ?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 25 Nov 2015, 11:22 last edited by
                  #10

                  Are you by any chance using the old macx-g++ mkspec ? If so, you should change to macx-clang, that should solve your problem.

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

                  D 1 Reply Last reply 25 Nov 2015, 11:47
                  0
                  • S SGaist
                    25 Nov 2015, 11:22

                    Are you by any chance using the old macx-g++ mkspec ? If so, you should change to macx-clang, that should solve your problem.

                    D Offline
                    D Offline
                    DEADBEEF
                    wrote on 25 Nov 2015, 11:47 last edited by
                    #11

                    @SGaist I apologize for my "noob" question but... Where can I check in Xcode if we use the old mac-g++ ? I'm really new with qt.
                    What I did was: download and link qt5 with home-brew and add the frameworks I needed in the "linked frameworks and libraries" part of "General" tab in my Xcode project.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 25 Nov 2015, 21:45 last edited by
                      #12

                      Did you generate the Xcode project using qmake ?

                      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
                      0

                      12/12

                      25 Nov 2015, 21:45

                      • Login

                      • Login or register to search.
                      12 out of 12
                      • First post
                        12/12
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved