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] add implementation - for many or all items
Qt 6.11 is out! See what's new in the release blog

[qtcreator] add implementation - for many or all items

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 1.1k 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.
  • E Offline
    E Offline
    egorski
    wrote on last edited by
    #1

    After creating class declaration, how to tell Qtcreator to execute "(context menu on function decl) > Refactor > Add Definition to foo.cpp" on multiple elements at once?

    E.g. user selects group of 5 lines/function decls. in editor, and then executes it for all of them (this, or other Refactor commands such as "Add definition outside of class").
    Another useful shortcut would be to do it for all (not yet refactored/implemented" functions of class), rather than selecting entire class first.

    I would expected that to happen when in editor you right-click on the class name in class decl., then Qtcreator could show menu with options (in Refactor) such as: "Add definition (of 7 methods) to foo.cpp".
    And similar when you select lines and then right-click.

    But currently this does not happen.

    Is there a way to achieve this now?
    If not, could it be implemented? It would be nice for fast prototyping of many simple classes.

    Is there any additional tool to quickly define classes with methods and generate such stub for the class?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Right click on Class name in header file -> Refactor -> Create implementation for member functions

      (Z(:^

      E 1 Reply Last reply
      3
      • sierdzioS sierdzio

        Right click on Class name in header file -> Refactor -> Create implementation for member functions

        E Offline
        E Offline
        egorski
        wrote on last edited by
        #3

        @sierdzio said in [qtcreator] add implementation - for many or all items:

        Right click on Class name in header file -> Refactor -> Create implementation for member functions

        no such option appears - I guess I have too old Qtcreator here "Qt Creator 4.8.2
        Based on Qt 5.11.3 (GCC 8.3.0, 64 bit)".

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Yes, upgrade to a newer one then.

          (Z(:^

          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