In this paper, we study QoS routing in wireless mesh networks with cognitive radios, which involves route selection, channel allocation and scheduling. It turns out to be a hard problem because of the impact of interference and channel heterogeneity. We formally model it as an optimization problem and present an Integer Linear Programming (ILP) formulation to provide optimal solutions. We then present a distributed routing protocol which can select a route and allocate resources for a connection request to satisfy its end-to-end bandwidth requirement. NS2 based simulation results show the performance given by our protocol is close to that of the optimal solution.