Results 1 to 6 of 6

Thread: QList of QTcpSocket derived class pointers (stack corruption)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QList of QTcpSocket derived class pointers (stack corruption)

    I forgot to add the definition of clients and dataClients. ClientSocket inherits from QTcpSocket and adds just a few parameters like openConnections and so on.

    Qt Code:
    1. QList<ClientSocket *> clients;
    2. QList<ClientSocket *> dataClients;
    To copy to clipboard, switch view to plain text mode 

    Is this the way to go or is there a better way?

    Should I rather use lists of actual objects than the pointers? Such as
    Qt Code:
    1. QList<ClientSocket> clients;
    To copy to clipboard, switch view to plain text mode 
    Or is this just wasting memory?
    Last edited by zAAm; 19th April 2010 at 22:10.

Similar Threads

  1. QList with pointers
    By Rockem in forum Qt Programming
    Replies: 9
    Last Post: 12th August 2009, 18:53
  2. array of pointers to QtcpSocket
    By gQt in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th June 2008, 09:15
  3. QList Pointers
    By coderbob in forum Newbie
    Replies: 2
    Last Post: 20th November 2007, 18:50
  4. Signal/slot looking in base class, not derived class
    By georgie in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 07:36
  5. QList of pointers
    By Farcaller in forum Newbie
    Replies: 4
    Last Post: 24th January 2006, 16:48

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.