QSurfaceFormat fmt(this->format()); cout << fmt.majorVersion() << "." << fmt.minorVersion() << endl;