Remove dependencies on QtWidgets