The whole of Croatia will be very busy in July including Krka! Your choice as to whether you have the time for this. I would do either an island or Krka, but not both as you only have 4 nights/5 days and do not want to spend ages in transit.
Some places on the islands have 3 night minimums stays in July, which will limit your choice. Others will have been booked months ago! You will Split opinion as to which is best between Hvar and Korcula lovers. Hvar town in July is full party season for the teenagers and twenty-somethings with loud music going on late into the night - head to the towns such as Stari Grad or Jelsa to the north of the island if you want a more peaceful break. Avoid Zlatni Rat on Brac for the same reason. Brac has the shortest transfer time from Split and Korcula the longest - with your limited time, perhaps a shorter transfer would be preferable? If you are only going for 1 or 2 nights, you are presumably going for the beaches and therefore location is less of an issue as you will not have a car to explore the islands.
Trogir and Split are close to each other, with Split being the larger of the two, but each can easily be explored from the other and are both worth seeing. Avoid Split if your trip coincides with the Ultra Europe Festival and go for Trogir, otherwise, I would stay in Split as there is more to see and a wider choice of accommodation.
Be prepared for all kinds of weather - last year in July we had several days of rain and it was c 24 degrees but in 2012, we had 45 degrees for most of the holiday and no rain for the entire 2 weeks there.