Qt Forum

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

    How do I access the nifty new "...insert an #include for an undefined identifier" in QtCreator 2.5 Beta?

    Tools
    4
    6
    1964
    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.
    • S
      solareclectic last edited by

      (from the announcement: http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/)
      It is probably staring me right in the face, but I don't see how to get to the "basic refactoring action" that I was so looking forward to. I started in the Help Index, for "#include." Next, searching the forums here didn't turn up anything newer than 2011 for "#include."

      Would someone please steer me in the right direction?
      Thanks

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        Insert "QTableView v;", move the cursor on the type name QTableView, hit Alt-Enter.

        1 Reply Last reply Reply Quote 0
        • S
          solareclectic last edited by

          Thanks for that.

          I see there is a difference if you are working on a Qt QUI app (this Alt-Enter feature works) or a Qt Console app (the Alt-Enter pop-up menu doesn't appear).

          1 Reply Last reply Reply Quote 0
          • A
            andre last edited by

            Well, that could be because QTableView is in QtGui, which in turn needs QApplication and the relevant
            @
            QT += GUI
            @
            in the .pro file?

            1 Reply Last reply Reply Quote 0
            • S
              stephenju last edited by

              [quote author="Tobias Hunger" date="1332916986"]Insert "QTableView v;", move the cursor on the type name QTableView, hit Alt-Enter.[/quote]
              What's the key combination for Mac version? And can this be added to the contextual menu?

              1 Reply Last reply Reply Quote 0
              • S
                stephenju last edited by

                Never mind. I figured it out. It's option-return.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post