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 functions make a Widget Parent of Another?
Forum Updated to NodeBB v4.3 + New Features

What functions make a Widget Parent of Another?

Scheduled Pinned Locked Moved Unsolved General and Desktop
widgetparent & childmemory leak
2 Posts 2 Posters 426 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.
  • L Offline
    L Offline
    leonardoMB
    wrote on 6 Jun 2022, 22:10 last edited by
    #1

    I'm searching for leaks in my program and learning QT. In the program there are some widgets created without parents, so there is no delete management on it. But since I use methods on those widgets I wonder if this methods can somehow make a widget parent of another. Is there ways to do it, without set parent and during constructions?

    J 1 Reply Last reply 7 Jun 2022, 05:57
    0
    • L leonardoMB
      6 Jun 2022, 22:10

      I'm searching for leaks in my program and learning QT. In the program there are some widgets created without parents, so there is no delete management on it. But since I use methods on those widgets I wonder if this methods can somehow make a widget parent of another. Is there ways to do it, without set parent and during constructions?

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 7 Jun 2022, 05:57 last edited by
      #2

      @leonardoMB

      • https://doc.qt.io/qt-5/qwidget.html#setParent
      • https://doc.qt.io/qt-5/qlayout.html#addItem (or addWidget)

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2

      2/2

      7 Jun 2022, 05:57

      • Login

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