Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Solved How to get active kit in source code?

    General and Desktop
    3
    7
    1232
    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.
    • kahlenberg
      kahlenberg last edited by

      Hi,
      I am making a project for ARM platform using cross-compiling on Linux. I have set two kits, one for Desktop (gcc) and one for ARM (arm-linux...). It works on both platform. I want to "know" which kit is currently active in source code.

      1 Reply Last reply Reply Quote 0
      • M
        mostefa last edited by

        Hi @kahlenberg

        There is screen icon on the left menu in qt creator, you have to click in this icon to know which kit is used for know

        alt text

        1 Reply Last reply Reply Quote 0
        • kahlenberg
          kahlenberg last edited by kahlenberg

          :) I know, but my question is how can I get this information in source code or during runtime?

          M 1 Reply Last reply Reply Quote 0
          • M
            mostefa @kahlenberg last edited by mostefa

            @kahlenberg said in How to get active kit in source code?:

            :) I know, but my question is how can I get this information in source code?

            Oh sorry

            you can use currentCpuArchitecture if you are using qt5

            http://doc.qt.io/qt-5/qsysinfo.html#currentCpuArchitecture

            1 Reply Last reply Reply Quote 1
            • kahlenberg
              kahlenberg last edited by

              Ok, Thank you. It is not exactly what i am looking for but it is also useful.
              Thanks.

              M 1 Reply Last reply Reply Quote 0
              • M
                mostefa @kahlenberg last edited by

                @kahlenberg said in How to get active kit in source code?:

                Ok, Thank you. It is not exactly what i am looking for but it is also useful.
                Thanks.

                You are looking for the exact name of your kit?

                As far as i know we can not get this information in source code,

                But who knows ...

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

                  Hi,

                  Why exactly do you need to know that in your sources ?

                  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