Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Nowa Klasa

    Polish
    1
    1
    944
    Loading More Posts
    • 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
      donex93 last edited by

      Zacząłem pisać w Qt pewien program i do tej pory wszystko wiedziałem z głównego pliku wyświetlałem za pomocą
      @ui->pushButton->setText(“WYKONANO”)@
      ale zrobiłem nową klasę "pomocnicza" w której mam
      @Pomocnicza::pomocnicza(int e, int y)
      {
      this->e = e;
      this->y = y;

      }
      void Pomocnicza::Utwoz(){
      ui->pushButton->setText("WYKONANO");
      }@

      i wyświetla mi błąd: 'ui' was not declared in this scope"
      jeśli dodam
      @MainWindow::ui->pushButton->setText("WYKONANO");@

      to mi wyświetla że jest prywatne a jak przeniose ui do public (w mainwindow.h) błąd: invalid use of non-static data member
      Proszę o pomoc

      1 Reply Last reply Reply Quote 0
      • First post
        Last post