modified opera_test.cpp for qt