Here are the rules for this years draft. It is from the leagues website.
http://theqmjhl.ca/article/nouvelles-regles-et-directives-pour-la-saison-2016-17
"Priority of Selection
The selection of players during the annual entry draft will be made, with the exception of the first round, in the reverse order of the teams in the general standings at the end of the regular schedule of the current season. When it comes to the first round, the selection will be made in the same order, with the exception of teams at the last five ranks of said general standings.
For these last five teams, including the two teams which did not take part in the playoffs, the selection order is determined by a draw, under the supervision of four team governors who are not involved. The probabilities to win this draw are established in accordance with the general standings at the end of the regular schedule, as the final rank provides the teams involved with a variable number of capsules (18th rank will have 9 capsules, 17th = 6 capsules, 16th = 3 capsules, 15th = 2 capsules, 14th = 1 capsule).
After the team which will select during the first rank of the entry draft is determined, all the capsules of the team involved are removed from the draw. This process is repeated each time a team is drawn. However, if the team that finished at the last rank is not picked during the first or the second lottery draw, it will be awarded automatically the third draft pick overall. Equally, if according to the process described previously, the team that finished at the last rank is awarded automatically the third draft pick overall, or was selected during the first or the second draw, while the team that finished next to last has not yet been selected, then the latter will be awarded automatically the fourth draft pick overall."