This is my source:
Qt Code:
  1. bool ok;
  2. QString passwd_request = QInputDialog::getText(this, tr("Give password:"),
  3. tr("Current Password:"), QLineEdit::Normal,
  4. "", &ok);
To copy to clipboard, switch view to plain text mode 
And these are the mad errors:
Qt Code:
  1. /home/alex/Qt/Machine/mainwindow.cpp:1189: warning: unused variable ‘ok’
  2. /home/alex/Qt/Machine/mainwindow.cpp:1192: error: ‘ok’ was not declared in this scope
To copy to clipboard, switch view to plain text mode 

The thing is that I used the same to the constructor of the program, where it asks for password as well and there is no problem. In a function, when a checkbox is checked is the problem....