A compact radio frequency quadrupole (RFQ) linac for accelerator-based boron neutron capture therapy is being developed at Xi'an Jiaotong University. By adopting a ramped inter-vane voltage in the beam dynamics design, the RFQ could accelerate a continuous wave proton beam to 2.6 MeV over a length of 4 m, effectively decreasing costs and saving space. To meet the beam-dynamics requirements, both the vane width and undercut were optimized during the electromagnetic design. In addition, π-mode stabilization loops were included to increase the mode separation, and fixed tuners with varying diameters were installed to obtain close frequency-tuning sensitivity. It was established that the field unflatness can be controlled within ±1.5% when all tuners remain at their nominal insertion depth. Optimized cooling-channel design was completed, and multi-physics analysis was conducted. The water tuning coefficients of the vane and wall channels were analyzed to establish the ability to fine tune the RFQ during operation.