Results 1 to 8 of 8

Thread: How to have autocompletion on vectors of custom classes

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to have autocompletion on vectors of custom classes

    I have a my_class with a methods
    Writing my_class. or my_class-> I have a window with the members of it.

    If I create a vector<my_class> I have not this help. ( autocompletion offers nothing)
    A tip, trick, macro, etc to help me ?
    Thanks

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,391
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to have autocompletion on vectors of custom classes

    Check if vector header is indexed. What's your editor ?

  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to have autocompletion on vectors of custom classes

    Qt creator.
    A vector of custom estructure offers me only the methods for vector(push_back, etc )
    ( and besides, I have to declare it as vector<.... not std::vector, in this last case nor autocompletion for vector is offerd )
    Thanks

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,391
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to have autocompletion on vectors of custom classes

    Looks like I have the same issue with my QtCreator installation. I don't know how to help you, for "serious" programming I'm using eclipse anyway. Maybe try updating QtCreator to new version (if there is any) ?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to have autocompletion on vectors of custom classes

    I'm not having such problems, autocompletion works fine for me with Qt Creator 2.2.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to have autocompletion on vectors of custom classes

    Hello I'm here again.
    I loose many time when I want to have autocompletion info for vectors of custom clasess.
    Stampede, whats the meaning of "have you vector header indexed"??
    Thanks

  7. #7
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,391
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to have autocompletion on vectors of custom classes

    @tonnot: I mean that indexer directories should contain path to this file, in order to parse it for symbols. I'm not sure how to add indexer path in QtCreator, as I'm using eclipse most of the time.
    But if you can use autocompletion for vector methods, it means that indexer parsed this file.
    And it looks like wysota does not have such issues with Qt Creator and vector autocompletion, for me it works the same way as you've described in first and third post too.

  8. #8
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to have autocompletion on vectors of custom classes

    The problem does not happen if you use QVector only with STL (or STD I dont know how to name them )
    Can this information be usefull?
    Thanks
    Last edited by tonnot; 12th July 2011 at 17:46.

Similar Threads

  1. QVector of pointers to custom classes that contain sockets
    By Gadgetman53 in forum Qt Programming
    Replies: 2
    Last Post: 12th April 2011, 05:01
  2. QWebView custom JS Classes?
    By ts230 in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2010, 06:17
  3. QVariant, QtDBus, pointers & custom classes
    By zuck in forum Qt Programming
    Replies: 7
    Last Post: 1st October 2009, 15:11
  4. Autocompletion using Qt
    By bismitapadhy in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2009, 18:02
  5. QcomboBox autoCompletion
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2006, 17:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.