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. Need help with Qt Creator flaky autocomplete with Pointer issue
Forum Updated to NodeBB v4.3 + New Features

Need help with Qt Creator flaky autocomplete with Pointer issue

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 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.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    I have a function that has the following code:
    @NodeShape* shape = new NodeShape()@

    If I attempt to us a function in the freshly created shape, say like this:

    @shape->setName("box");@

    Qt Creators auto complete refuses to suggest the functions available in NodeShape. However, if I do this:

    @NodeShape* shape = NULL;
    shape = new Nodeshape();@

    The auto complete now works! Whats going on here?

    I did a little more poking around. If I do this:

    @NodeShape* shape = new NodeShape;@

    it works as well. I guess those brackets are part of the problem!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Sounds like a bug, you should take a look at the "bug report system":http://bugreports.qt-project.org to see if it's something known

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

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        Hi,

        [quote author="kloveridge" date="1411505347"]I have a function that has the following code:
        @NodeShape* shape = new NodeShape()@
        [/quote]

        Did you put a semicolon at the end of that line?

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kloveridge
          wrote on last edited by
          #4

          Yes. My little code snippet above didn't reflect that. But it is in my code.

          This has turned out to be no-biggie. I just won't put parathesis in a new call if I know the object doesn't have any arguments.

          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