Qt Forum

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

    Call for Presentations - Qt World Summit

    Solved What class of Qt can replace the class CPtrList of MFC?

    General and Desktop
    4
    5
    780
    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.
    • small_bird
      small_bird last edited by

      The question is as the title: What class of Qt can replace the class CPtrList of MFC?

      beecksche 1 Reply Last reply Reply Quote 0
      • beecksche
        beecksche @small_bird last edited by

        @small_bird
        I don't know what the CPtrList class normally does, but as i think it is a list which stores pointers?

        Have a look here.

        1 Reply Last reply Reply Quote 0
        • E
          Eeli K last edited by

          Yes it seems to be a list of pointers, https://msdn.microsoft.com/en-us/library/0sbwsc4e.aspx. Beecksche gave a proper link. But in many cases you can also use the standard C++ STL containers if you want (http://en.cppreference.com/w/cpp/container, http://www.cplusplus.com/reference/stl/).

          beecksche 1 Reply Last reply Reply Quote 0
          • beecksche
            beecksche @Eeli K last edited by

            @Eeli-K
            When using the Qt Framework i would prefer the Qt containers:

            These container classes are designed to be lighter, safer, and easier to use than the STL containers

            mrjj 1 Reply Last reply Reply Quote 1
            • mrjj
              mrjj Lifetime Qt Champion @beecksche last edited by mrjj

              @beecksche
              a QList<Type *> would work the same it seems.
              The access functions are very similar but of course named differently.

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