It's not at all complicated. At least not when you take the timeline in consideration.
In the 80's the Hamas described itself as a charity organization. Israel financed it in a hope that it would be a counter balance to the PLO.
When Israel understood that it is a Muslim Brotherhood organization that is willing to act violently, Israel stopped the financial support.
After the disengagement from Gaza and the Hamas take over Israel had several rounds of fighting with Hamas. At a certain point it seemed as if Hamas had had enough and is focusing on rebuilding it's civilian infrastructure. In hopes of encouraging this, Israel allowed Qatar to finance Hamas.
Then came 7.10 and showed Israel that a leopard can't lose it's spots and a Muslim can't forfeit violence as a means for political / religious change.
I hope this made some order in the chaos.