Results 1 to 2 of 2

Thread: how to properly close and delete a websocket?

  1. #1
    Join Date
    Oct 2017
    Qt products

    Default how to properly close and delete a websocket?

    my app uses websocket, i want to close it and delete the websocket when it is not needed. what should i do?
    i looked at the echo examples, only found it doesnt close and delete the socket object, exits to system directly.

    thanks in advance.

  2. #2
    Join Date
    Mar 2011
    Hyderabad, India
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    MacOS X Unix/X11 Windows
    Wiki edits

    Default Re: how to properly close and delete a websocket?

    Quote Originally Posted by Qt Documentation

    Destroys the QWebSocket. Closes the socket if it is still open, and releases any used resources.
    Just delete it
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Qt application doesn't close properly during QEventloop
    By jigglyslime in forum Qt Programming
    Replies: 9
    Last Post: 6th November 2013, 10:03
  2. How to close (exit) a dialog properly
    By cooper in forum Newbie
    Replies: 6
    Last Post: 9th March 2011, 20:19
  3. Properly close database handlers
    By ruben.rodrigues in forum Newbie
    Replies: 5
    Last Post: 23rd September 2010, 17:10
  4. Delete/Close Dialog correct?
    By kei in forum Qt Programming
    Replies: 8
    Last Post: 2nd July 2009, 14:51
  5. How to properly delete structures?
    By aarelovich in forum General Programming
    Replies: 5
    Last Post: 24th February 2009, 01:39


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.