I'm writting my first program in Qt Designer, and I have problem with changing QLineEdit
text to nothing. I want to use for this operation detached thread, so I can continue working in another part of program without waiting for end of Sleep(5000)
function. But when I want to compile this code I'm getting 3 errors:
C2065: "ui" : undeclared identifier
C2227: left "->AutoWyl_textPotwierdzenie" must pointing type class/struct/union/generic
C2227: left "->setText" must pointing type class/struct/union/generic
Could you help me with that errors? Thanks in advance.
Here is problematic part of code:
{...
void autowyl_potwierdzenie_reset();
std::thread reset(autowyl_potwierdzenie_reset);
reset.detach();
}
void autowyl_potwierdzenie_reset()
{
Sleep(5000);
ui->Autowyl_textPotwierdzenie->setText(""); //3 errors
}