some code  using c++ and qt