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?
Forum Updated to NodeBB v4.3 + New Features

Has the QTextBrowser windows memory to be deleted?

Scheduled Pinned Locked Moved Solved General and Desktop
close window
4 Posts 3 Posters 610 Views 3 Watching
  • 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 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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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
      1
      • mrjjM mrjj

        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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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

          • Login

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