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. [Solved] Problem with accessing two classes from each other.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 525 Views 1 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.
  • T Offline
    T Offline
    tomi35
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tomi35
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

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