I don't know very much about the specific circumstances that led to the Kosovan declaration. But I do wonder whether if Gaza or Palestine (Gaza/West Bank) decided to declare independence, if that move would be consistent with international law. Not that such a move would be a novelty, as Arafat declared independence in 1988 from his cushy residence in Tunis, Tunisia. That declaration was not universally accepted (at least by the states that had not already recognizing Palestine), and was most likely inconsistent with international law. But would such a move today violate international law?
Article 1 of the Montevideo Convention on the Rights and Duties of States lists four characteristics necessary for statehood:
a ) a permanent population; b ) a defined territory; c ) government; and d) capacity to enter into relations with the other states.
Let's look at these necessary conditions in regard to a Hamas declaration of statehood in Gaza or a joint declaration of the West Bank and Gaza.
1) A permanent population: In both cases, this condition has probably been fulfilled. Notwithstanding the question of whether Palestinians were a people in 1922, 1947, or 1967, they probably qualify today. Many Palestinians in the territories have been living there their entire lives. They consider themselves Palestinian. Much, if not the majority, of the world considers them a separate people. The Palestinians probably fulfill this condition.
The Palestinians in Gaza can make a similar, but weaker, claim. Gazans and West Bankers have a somewhat disparate history, given the different occupiers from 1948-1967. The Egyptians treated the Gazan quite differently than the West Bankers were treated by Jordan. I'm not sure Gazans can make a serious argument that they are truly distinct from the Palestinians in the West Bank, so I'm not sure they can claim to have a permanent population independent of the West Bank.
2) A defined territory: The Gazans can argue they fulfill this requirement fairly easily. There aren't any serious claims to any part of Gaza coming from any other countries, Israel and Egypt included.
The Palestinians as a whole cannot make the same claim. Israel claims, at least in theory, a large segment of the West Bank. Moreover, there are competing claims over Jerusalem, which would likely be considered a part of Palestine if a state were declared.
However, clearly defined borders are not a necessary condition for statehood. Israel did not have such borders in 1948 when it declared independence or in 1949 when the UN admitted Israel (in truth it doesn't even have them today). It is sufficient to have a claim over a certain general area, even if the exact parameters have yet to be decided. So the Palestinians can probably claim they can fulfill this condition.
3) Government: This is probably where both claims fail. Neither Hamas in Gaza or Fatah in the West Bank exercise any serious government functions right now. The primary function of a government is to supply law and order. Abbas cannot even control his own subordinates, never mind actually ensure that his reign is supreme. Hamas has a little more control, but how long will that really last? If Fatah regains a stronghold in Gaza, can Hamas ensure its superiority? Or is the Hamas victory there merely temporary?
Additionally, neither group can prevent Israel from invading at will. Israel currently controls the borders of Gaza and has the ability to launch operations at any time. In the West Bank the situation is even worse. Israel has numerous bases and settlements throughout the West Bank. Fatah can do nothing to stop that, short of actually making peace, which we all know isn't happening any time soon. So neither Gaza nor Palestine fulfill this qualification.
4) Capacity to enter into relations with the other states: The PA in the West Bank has a much better infrastructure for dealing with international affairs. They have observer status in the UN General Assembly. They have consulates in a wide-range of countries. And they have a real working foreign ministry.
The Gazans don't have a similar structure in place. And given Hamas' reputation worldwide, I'm not sure they could build it in the future.
In summary both Gaza and Palestine probably fail the government condition, which deprives them of statehood under this treaty and they do not consistute a state under the Montevideo Treaty.
Besides the Montevideo Treaty, there is also a theory that recognition is a necessary and sufficient condition for statehood. International law distinguishes between the recognition of statehood and the recognition of a government. A state can recognize the former without recognizing the latter. Most countries that recognize the state of Palestine recognize the Palestinian National Authority, though not all. Moreover, well over 100 countries have accorded recognition to Palestine over the last 60 years.
In my mind the constitutive theory of statehood is flawed because it allows the creation of states that do not fulfill the most basic conditions of statehood. A state cannot exist if it doesn't have a government or territory. Palestine and Gaza probably have the latter, but not the former.
So if either Hamas or Palestine declared independence tomorrow, I don't think they would be a state under international law.