Fist off all show us your strange errors
Second just remark : why are you decalre Q3Canvas pointer in main and then put it in your class if you doesnt use it in main later ?