1

I'm currently developing a Console Unit Test Client with Google Test. The Tests involves a step where a binary file is downloaded from a server. To download this file I thought about using Qt.

Now I took the example code from https://wiki.qt.io/Download_Data_from_URL

This gives me the error QEventloop canot be used without QApplication

I found this thread QEventLoop: Cannot be used without QApplication

However this works for a UI application. My googletest main is predefined

GTEST_API_ int main(int argc, char **argv) {

  printf("Running main() from %s\n", __FILE__);
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}

Where would be a good place to add the QApplication?

Could you help me out?

thx for your help :)

JHeni
  • 455
  • 3
  • 12

0 Answers0