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. qtcreator autocompletion for c++ auto keyword

qtcreator autocompletion for c++ auto keyword

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 460 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
    Mr Pang
    wrote on last edited by
    #1

    When I write

    std::shared_ptr<QWidget> w = std::make_shared<QWidget>();
    

    And then

    w.
    

    function list will popup.
    But when I write

    auto w = std::make_shared<QWidget>();
    

    Nothing popup when I write

    w.
    

    Doesn't qtcreator support auto keyword yet?
    My qtcreator version is 4.5.2 under ubuntu 1804

    K aha_1980A 2 Replies Last reply
    0
    • M Mr Pang

      When I write

      std::shared_ptr<QWidget> w = std::make_shared<QWidget>();
      

      And then

      w.
      

      function list will popup.
      But when I write

      auto w = std::make_shared<QWidget>();
      

      Nothing popup when I write

      w.
      

      Doesn't qtcreator support auto keyword yet?
      My qtcreator version is 4.5.2 under ubuntu 1804

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Mr-Pang

      That is a good question.

      However, you are using an old version of creator. Therefore, it is also very likely that it has been introduced, but in a latter version of creator. Weare already at version 4.10

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • M Mr Pang

        When I write

        std::shared_ptr<QWidget> w = std::make_shared<QWidget>();
        

        And then

        w.
        

        function list will popup.
        But when I write

        auto w = std::make_shared<QWidget>();
        

        Nothing popup when I write

        w.
        

        Doesn't qtcreator support auto keyword yet?
        My qtcreator version is 4.5.2 under ubuntu 1804

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi @Mr-Pang,

        as @koahnig already said, you should update. There has been 5 major releases, and especially the C++ support with the Clang Code Model improved rapidely. (Okay, sometimes you get new problems with Clang, but that's another topic).

        9940461d-24e6-48e7-b565-1667ecee6134-image.png

        Regards

        Qt has to stay free or it will die.

        M 1 Reply Last reply
        1
        • aha_1980A aha_1980

          Hi @Mr-Pang,

          as @koahnig already said, you should update. There has been 5 major releases, and especially the C++ support with the Clang Code Model improved rapidely. (Okay, sometimes you get new problems with Clang, but that's another topic).

          9940461d-24e6-48e7-b565-1667ecee6134-image.png

          Regards

          M Offline
          M Offline
          Mr Pang
          wrote on last edited by
          #4

          @aha_1980
          OK. But ubuntu 1804 only has 4.5.2.

          aha_1980A 1 Reply Last reply
          0
          • M Mr Pang

            @aha_1980
            OK. But ubuntu 1804 only has 4.5.2.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Mr-Pang You can install it with the online installer together with a recent Qt version.

            That's how I do it on Ubuntu 18.04 ;)

            Qt has to stay free or it will die.

            1 Reply Last reply
            1

            • Login

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