Set TimeMachine backup volume via shell when afp connection in finder does not work.
sudo tmutil setdestination afp://<your Qnap time machine user>:<your Qnap time machine password>@<your Qnap ip address>/TMBackup