Home > other >  QT with example TCP this period of I am not very understand, please explain
QT with example TCP this period of I am not very understand, please explain

Time:03-03

 this code... I don't know.. Can you explain? Had jumped over in detail more ` ` ` ` copying code QNetworkConfigurationManager manager; If (manager. "capabilities () & amp; QNetworkConfigurationManager: : NetworkSessionRequired) {//Get saved the network configuration//QMessageBox: : information (NULL, tr (" test "), tr (" what happen!" )); QSettings Settings (QSettings: : UserScope, QLatin1String (" Trolltech ")); Settings. BeginGroup (QLatin1String (" QtNetwork ")); Const QString id=Settings. The value (QLatin1String (" DefaultNetworkConfiguration ")). The toString (); Settings. EndGroup ();//If the saved the network configuration is not currently the discovered the use the system default QNetworkConfiguration config=manager. ConfigurationFromIdentifier (id); If ((config. The state () & amp; QNetworkConfiguration: : the Discovered)!=QNetworkConfiguration: : the Discovered) {config=manager. DefaultConfiguration (); } networkSession=new QNetworkSession (config, this); The connect (networkSession, SIGNAL (the opened ()), and this, SLOT (sessionOpened ())); GetFortuneButton - & gt; SetEnabled (false); StatusLabel - & gt; SetText (tr (" Opening the network session. ")); NetworkSession - & gt; The open (); }

CodePudding user response:

Even regardless of a paragraph, you who have the patience to see ah...
Also ask what the keywords in the search for example, I completely can't find...
  • Related