Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] Problem with accessing two classes from each other.



  • Hello.

    I have a problem with my program. I created a Utils class, where I store some utility functions of my program. I want to access the mainwindow class (where some function from the Utils class called) to access the Ui components. The problem if I try to pass the mainwindow class itself to the Utils class (to make possible to acces Ui) I get an error like "'Utils' does not name a type".

    Is there a way to make possible for 2 classes to access each other?



  • Okay, I solved my problem by using the main class to call functions from the Utils class.


Log in to reply