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. Going crazy?
Qt 6.11 is out! See what's new in the release blog

Going crazy?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 716 Views 2 Watching
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #1

    In my .pro file I have added a definition:

    DEFINES += QT_PRECATED_WARNINGS TRAINER
    

    Is this the correct way to add a second definition?

    When I look at the source in Qt Creator:

    #if defined(TRAINER)
    /*Source is not greyed out which is what I expect*/
    #else
    /*Source IS greyed again what I expect*/
    #endif
    

    What is confusing me is that when I launch the application in debugger, It steps into the code that IS greyed, whats going on?

    Now trying:

    DEFINES += QT_PRECATED_WARNINGS
    DEFINES += TRAINER
    

    This works, so its just confusing that it works either way in Qt Creator but not when debugging.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      rerun qmake

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      3
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        DEFINES_DEBUG

        Specifies preprocessor defines for the debug configuration. The values of this variable get added to DEFINES after the project is loaded. This variable is typically set in qmake.conf and rarely needs to be modified.

        This variable was introduced in Qt 5.13.2.
        DEFINES_RELEASE

        Specifies preprocessor defines for the release configuration. The values of this variable get added to DEFINES after the project is loaded. This variable is typically set in qmake.conf and rarely needs to be modified.

        https://doc.qt.io/qt-5/qmake-variable-reference.html#defines

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SimonSchroeder
          wrote on last edited by
          #4

          BTW: Do you mean QT_DEPRECATED_WARNINGS instead of QT_PRECATED_WARNINGS?

          SPlattenS 1 Reply Last reply
          0
          • S SimonSchroeder

            BTW: Do you mean QT_DEPRECATED_WARNINGS instead of QT_PRECATED_WARNINGS?

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            @SimonSchroeder said in Going crazy?:

            QT_DEPRECATED_WARNINGS

            Yes, QT_DEPRECATED_WARNINGS is correct:
            https://doc.qt.io/qt-5/qtglobal.html

            Kind Regards,
            Sy

            1 Reply Last reply
            0

            • Login

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