Qt ui in new class



  • macierz.h
    @#ifndef MACIERZ_H
    #define MACIERZ_H

    #include <ui_mainwindow.h>

    class Macierz
    {
    public:
    Macierz(int wiersze, int kolumny);
    void Utwoz();
    private:

    };

    #endif // MACIERZ_H@

    macierz.cpp

    @#include "macierz.h"
    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include "macierz.h"

    Macierz::Macierz(int wiersze, int kolumny)
    {
    this->wiersze = wiersze;
    this->kolumny = kolumny;

    }

    void Macierz::Utwoz()
    {
    ui->pushButton->setEnabled(false);

    }@

    @ui->pushButton->setEnabled(false);@

    do error: 'ui' was not declared in this scope

    how i can repair this error ?
    in "MainWindow" this

    @ui->pushButton->setEnabled(false);@

    work correctly


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.