Reference : Hisn al-Muslim 144

قَدَّرَ اللهُ وَما شـاءَ فَعَـل
Qaddarallāhu wa mā shā'a fa`al.

It is the Decree of Allah and He does whatever He wills.

Reference:
"The strong believer is better and more dear to Allah than the weak 
believer, and in each of them there is good. Be vigilant for what is to 
your benefit and seek the help of Allah and do not falter. But when you are 
striken by some setback, do not say: 'If only I had done such and such,' 
rather say: 'It is the Decree of Allah and He does whatever He wills.' For 
verily the saying 'if (i.e. if only I had) begins the work of the Devil." 
Muslim 4/2052.

Chapter: When stricken with a mishap or overtaken by an affair