I want whenever i press tab space cursor will move 4 position forward. I tried this code but its not working. Can anybody tell me what is wrong with the code? Why this code is not working?
void MainWindow::keyPress(QKeyEvent *eve)
{
if (eve->key()==Qt::Key_Tab)
{
ui->plainTextEdit->insertPlainText(" ");
}
}
Bookmarks