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. Has the QTextBrowser windows memory to be deleted?
QtWS25 Last Chance

Has the QTextBrowser windows memory to be deleted?

Scheduled Pinned Locked Moved Solved General and Desktop
close window
4 Posts 3 Posters 601 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.
  • K Offline
    K Offline
    koahnig
    wrote on 27 Nov 2018, 20:37 last edited by
    #1

    It is a very basic question.

    A QTextBrowser is allocated through new to a pointer. Some text is loaded into the window and shown with show() on screen.

    The text in the browser can be read and maybe closed by using the cross in the right-upper corner on windows.

    For clean-up I thought of connecting a suitable signal of QTextBrowser to be connected to deleteLater of QTextBrowser, but I could not find a suitable signal.

    Did I confuse myself and was trying to overdo the cleanup and it is all already handled within QTextBrowser?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 27 Nov 2018, 20:49 last edited by
      #2

      Hi
      As far as i know, all clean up is handled by its internal q->QTextEdit
      and if the QTextBrowser itself is deleted by parent, no extra clean seems needed.

      K 1 Reply Last reply 27 Nov 2018, 21:00
      1
      • M mrjj
        27 Nov 2018, 20:49

        Hi
        As far as i know, all clean up is handled by its internal q->QTextEdit
        and if the QTextBrowser itself is deleted by parent, no extra clean seems needed.

        K Offline
        K Offline
        koahnig
        wrote on 27 Nov 2018, 21:00 last edited by
        #3

        @mrjj

        QTextBrowser has been allocated with nullptr as parent.

        In this case it should still something around?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Nov 2018, 21:02 last edited by
          #4

          Hi,

          Use the Qt::WA_DeleteOnClose widget attribute and you should be fine.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          1/4

          27 Nov 2018, 20:37

          • Login

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