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. What class of Qt can replace the class CPtrList of MFC?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 1.0k 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.
  • S Offline
    S Offline
    small_bird
    wrote on 7 May 2017, 06:26 last edited by
    #1

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

    B 1 Reply Last reply 7 May 2017, 15:58
    0
    • S small_bird
      7 May 2017, 06:26

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

      B Offline
      B Offline
      beecksche
      wrote on 7 May 2017, 15:58 last edited by
      #2

      @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
      0
      • E Offline
        E Offline
        Eeli K
        wrote on 7 May 2017, 16:22 last edited by
        #3

        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/).

        B 1 Reply Last reply 7 May 2017, 16:36
        0
        • E Eeli K
          7 May 2017, 16:22

          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/).

          B Offline
          B Offline
          beecksche
          wrote on 7 May 2017, 16:36 last edited by
          #4

          @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

          M 1 Reply Last reply 7 May 2017, 18:08
          1
          • B beecksche
            7 May 2017, 16:36

            @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

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 7 May 2017, 18:08 last edited by mrjj 5 Jul 2017, 18:08
            #5

            @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
            0

            1/5

            7 May 2017, 06:26

            • Login

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