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. child and parent ??
Qt 6.11 is out! See what's new in the release blog

child and parent ??

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 228 Views 2 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.
  • D Offline
    D Offline
    Duy Khang
    wrote on last edited by
    #1

    how can i solve error GUI of child class lying on top of GUI parent class when use
    -> Child* ch = new Child(this), (this = parent class ). Then GUI of Child class will lying on top of GUI parent class

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      What you mean with "on top" ?
      Like a window or how ?

      If yes, like a window. Make sure you forward the "this" parameter to the base class of "Child"

      like
      Window::Window(QWidget *parent)
      : QWidget(parent), <<< forward to base

      If in doubt what i mean, please show Child's
      constructor implementation.

      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