qtdemo: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/lib64/qt4/bin/qtdemo - from package: qt-demos

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/lib/x86_64-linux-gnu/qt4/bin/qtdemo - from package: qt4-demos

You may install the required package with command apt-get install {package}
Error in other languages:
qtdemo: bevel nie gevind nie
qtdemo: comandă negăsită
qtdemo: comando não encontrado
qtdemo: commande introuvable
qtdemo: command not found
qtdemo: käsku ei ole
qtdemo: không tìm thấy lệnh
qtdemo: komanda nerasta
qtdemo: Kommando nicht gefunden.
qtdemo: kommandot finns inte
qtdemo: komut yok
qtdemo: nie znaleziono polecenia
qtdemo: níor aimsíodh an t-ordú
qtdemo: no se encontró la orden
qtdemo: no s'ha trobat l'ordre
qtdemo: opdracht niet gevonden
qtdemo: parancs nem található
qtdemo: perintah tidak ditemukan
qtdemo: príkaz nenájdený
qtdemo: příkaz nenalezen
qtdemo: команда не найдена
qtdemo: командата не е открита
qtdemo: 命令找不到
qtdemo: コマンドが見つかりません