-1
#include "textfinder.h"
#include "ui_textfinder.h"
#include <QFile>
#include <QTextStream>
#include <QTextEdit>

TextFinder::TextFinder(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::TextFinder)
{
    ui->setupUi(this);
}

TextFinder::~TextFinder()
{
    delete ui;
}

void TextFinder::on_findButton_clicked()
{

}
void TextFinder::loadTextFile()
{
    QFile inputFile(":/input.txt");
    inputFile.open(QIODevice::ReadOnly);

    QTextStream in(&inputFile);
    QString line = in.readAll();
    inputFile.close();

    ui->textEdit->
}

I have problem with ui->textEdit->setPlainText(line) (no member named 'TextEdit' in 'Ui::TextFinder' )

there is an image of ui

enter image description here

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Deniz
  • 15
  • 5
  • Have you tried compiling it anyway? The `ui_file.h` usually are generated each time you compile from the ui xml file, so after you add something the header is not updated right away. – Silvano Cerza Jul 15 '19 at 08:29

2 Answers2

1

The ui_textfinder.h is generated each time you compile, so autocomplete might not work after updating the textfinder.ui file even if the widget has been added.

To solve the issue just compile the project anyway, this way ui_textfinder.h is updated and autocomplete works.

Silvano Cerza
  • 954
  • 5
  • 16
0

Try to compile your project once again.