The Women - 4:78 "Death overtakes you wherever you are, even if you are in strong fortresses. If something good befalls them, they say, "It is from Allah". And if evil befalls them, they say, "It is from you."Say, "It is all from Allah."What is happening to this people that they hardly understand any hadith (saying)!"
Related:
Sheva/34:50 "Say, "If I go astray, it is my own fault, but if I find the way, it is because my Lord has revealed it to me. He is All-Hearing, All-Knowing."

The Stories/28:47 "So that when a calamity befalls them because of what their own hands have wrought, they may not be able to say: "Our Lord, if you had sent us a messenger, we would have followed your verses and been of the believers"..."

The Romans/30:41 Calamities spread on land and sea because of what the people have done with their hands. So He makes them taste some of what they used to do in order that they may turn back (from evil).
The Romans/30:36 When We bestow a mercy on the people, they rejoice in it. But when evil touches them as a recompense for what they used to do, they immediately fall into despair.

The Heights/7:131 "When good came to them, they used to say: "We deserved it", and when evil touched them, they used to accuse Moses and his companions of bad luck. Indeed, their bad luck is decided by Allah. But most of them do not know."