Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator - create only getter or only setter
QtWS25 Last Chance

QtCreator - create only getter or only setter

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
qtcreatorgettersetterfield
5 Posts 3 Posters 2.2k 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.
  • M Offline
    M Offline
    morsisko
    wrote on 14 Feb 2016, 14:22 last edited by
    #1

    Hi,
    Is there a way to create only a getter/setter of field? I know that there is a option to create getter&setter, but I don't see something that would let me create ONLY getter or only setter.
    Thanks for answer.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 Feb 2016, 00:03 last edited by
      #2

      Hi and welcome to devnet,

      Do you mean that for Qt's property system ?

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

      M 1 Reply Last reply 15 Feb 2016, 11:25
      0
      • S SGaist
        15 Feb 2016, 00:03

        Hi and welcome to devnet,

        Do you mean that for Qt's property system ?

        M Offline
        M Offline
        morsisko
        wrote on 15 Feb 2016, 11:25 last edited by
        #3

        @SGaist I mean something like when you click on class field you have a menu called "Refactor", and after "Create getter and setter member function", but it crates getter and setter, when i want create only getter. Yes i can delete the setter from .h and .cpp file but it takes too much time when you have to create about 200 getters. :(

        K 1 Reply Last reply 15 Feb 2016, 18:11
        0
        • M morsisko
          15 Feb 2016, 11:25

          @SGaist I mean something like when you click on class field you have a menu called "Refactor", and after "Create getter and setter member function", but it crates getter and setter, when i want create only getter. Yes i can delete the setter from .h and .cpp file but it takes too much time when you have to create about 200 getters. :(

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 15 Feb 2016, 18:11 last edited by
          #4

          @morsisko
          I have that in the context menu. Maybe you're using an older version of QtCreator (I have 3.6.0 here)?

          Context menu

          Kind regards.

          Read and abide by the Qt Code of Conduct

          M 1 Reply Last reply 16 Feb 2016, 22:01
          0
          • K kshegunov
            15 Feb 2016, 18:11

            @morsisko
            I have that in the context menu. Maybe you're using an older version of QtCreator (I have 3.6.0 here)?

            Context menu

            Kind regards.

            M Offline
            M Offline
            morsisko
            wrote on 16 Feb 2016, 22:01 last edited by
            #5

            @kshegunov Many thanks, i had the eariler version of qtCreator.

            1 Reply Last reply
            0

            1/5

            14 Feb 2016, 14:22

            • Login

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