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. problem of hierarchy of a project
Forum Updated to NodeBB v4.3 + New Features

problem of hierarchy of a project

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 319 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.
  • Z Offline
    Z Offline
    Zunneh
    wrote on last edited by
    #1

    Hello guys , first of all i'm not pro on Qt and C++ , this is why i have this problem
    i created Projet A with Qt Designer ( many widgets ) and i added many classes to this Project (i gonna name them B,C,D....) , my problem is how can i control the main Widget in A from class B for exemple , i created a QTabWidget in class A , now in Class B i want to ADDTab to the QTabWidget from class A( the problem is he does not recognize the name of widgets in class A ) , another exemple i want to add a QPushButton to my MainWindow from class B when i try to put the parent he does not recognize it , i tried to add includes to all file but don't work
    i hope you understand my problem , thanks guys

    my english is average, please use simple words and try to be the most explicit, thank you

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

      Hi,

      From the looks of your description you seem to try to create some sort of frankenmonster.

      You should rather start by clearly designing what each element does. From your description you have widgets that should know of each other that are trying to modify each other. Which is bad.

      Typically, I child widget should not know nor try to use its parent widget. It's the parent that should connect and manipulate the child.

      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