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. what's the difference?? HEADERS = calculatorform.h HEADERS += calculatorform.h
Qt 6.11 is out! See what's new in the release blog

what's the difference?? HEADERS = calculatorform.h HEADERS += calculatorform.h

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 1.5k Views 1 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.
  • T Offline
    T Offline
    tecky
    wrote on last edited by
    #1

    what's the difference??

    HEADERS = calculatorform.h
    HEADERS += calculatorform.h

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      it's the same syntax like in C++.
      The first one replaces/overwrites the the contents of HEADERS, the second one appends to it's already set contents.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • podsvirovP Offline
        podsvirovP Offline
        podsvirov
        wrote on last edited by
        #3

        About the operators you can read "here":http://qt-project.org/doc/qt-5.0/qtdoc/qmake-advanced-usage.html#operators.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tomma
          wrote on last edited by
          #4

          "HEADERS = calculatorform.h" is assignment. Your HEADERS will contains ONLY calculatorform.h.

          HEADERS += calculatorform.h is addition assignment and it equals HEADERS = $$HEADERS calculatorform.h.

          You can test it with:
          @TEST = test.a test.b
          message($$TEST)
          TEST += test.c
          message($$TEST)
          TEST = $$TEST test.d
          message($$TEST)
          TEST = test.f
          message($$TEST)@

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tecky
            wrote on last edited by
            #5

            ty
            simple
            intelligibly

            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