how do you make the internet check not make the application delay opening
-
How do I make this internet check not interfere when opening the application, or make this internet check run behind the scenes so as not to make the application delay opening? I enlarge the delay so that if the internet is available and unstable it will still get the status that it is connected to the internet.
int main(int argc, char *argv[]) { QApplication a(argc, argv); socket.connectToHost(googleurl, 80); if (socket.waitForConnected(10000)) { } MainWindow w; w.show(); return a.exec(); }
-
Use signals and slots - connec to https://doc.qt.io/qt-6/qabstractsocket.html#connected and the respective error signals to see if the connection is ok or not.
-
How do I make this internet check not interfere when opening the application, or make this internet check run behind the scenes so as not to make the application delay opening? I enlarge the delay so that if the internet is available and unstable it will still get the status that it is connected to the internet.
int main(int argc, char *argv[]) { QApplication a(argc, argv); socket.connectToHost(googleurl, 80); if (socket.waitForConnected(10000)) { } MainWindow w; w.show(); return a.exec(); }
@Blackzero create a splash widget.
-
@Blackzero create a splash widget.