Merging binaries of neutron-stars are not only strong sources of gravitational waves, but also have the potential of revealing states of matter at densities and temperatures not accessible in laboratories. A crucial and long-standing question in this context is whether quarks are deconfined as a result of the dramatic increase in density and temperature following the merger. We present the first fully general-relativistic simulations of merging neutron-stars including quarks at finite temperatures that can be switched off consistently in the equation of state. Within our approach, we can determine clearly what signatures a quark-hadron phase transition would leave in the gravitational-wave signal. We show that if after the merger the conditions are met for a phase transition to take place at several times nuclear saturation density, they would lead to a postmerger signal considerably different from the one expected from the inspiral, that can only probe the hadronic part of the equations of state, and to an anticipated collapse of the merged object. We also show that the phase transition leads to a very hot and dense quark core that, when it collapses to a black hole, produces a ringdown signal different from the hadronic one. Finally, in analogy with what is done in heavy-ion collisions, we use the evolution of the temperature and density in the merger remnant to illustrate the properties of the phase transition in a QCD phase diagram.