Skip to content
  • QTcpSocket/QMQTT - Strange Error Codes

    Solved General and Desktop network qtcpsocket mqtt
    8
    0 Votes
    8 Posts
    5k Views
    B
    @Pablo-J-Rogina yes, and it doesn't say much more than what can be gleaned from the function signature. What is missing is any discussion of why one might want to call it (in normal circumstances that is, not to work around what apparently is a bug). Also, as I asked, whether calling it might have any adverse effects.
  • 0 Votes
    4 Posts
    2k Views
    ChristianMonteroC
    @ambershark Thank you very much for your help, now it's working, it seems like I was passing the IP argument incorrectly, now I know that I have to send this parameter inside a QT function. thanks!
  • Conexión UDP para enviar y recibir mensajes

    Unsolved Spanish udp server network socket
    3
    0 Votes
    3 Posts
    2k Views
    ChristianMonteroC
    @juanki sí, de hecho al final encontre que mi error era porque la IP la tenia que mandar dentro de un método de la librería, igual gracias por tu post :)
  • 0 Votes
    2 Posts
    1k Views
    VRoninV
    QHttp cosi' come il tuo modulo non puo' gestire l'http moderno, in particolare SSL. Mentre mi devo congratulare per lo sforzo profuso, suggerirei un passo indietro, perche' non puoi usare QNetworkAccessManager (o un wrapper attorno a esso)? Se la risposta alla precedente domanda e' "perche' alcune cose che mi servono non sono implementate" (di solito questo e' un problema quando si sostituisce QFtp, non QHttp), potresti considerare un wrapper attorno a libcurl? magari fruttando curlpp?
  • 0 Votes
    14 Posts
    7k Views
    QjayQ
    Thanks everyone for insight . I have some idea now from where i should start .
  • 0 Votes
    5 Posts
    3k Views
    ekkescornerE
    @SGaist thx - have thought the same. would work well if Active and bad coverage or coming back from suspended when multi signals are received
  • 0 Votes
    4 Posts
    6k Views
    kshegunovK
    Don't get this the wrong way, but are you coming from Java? I'm asking because this: QHostAddress().AnyIPv4 Doesn't make any sense in C++. What you probably want is to use the scope operator - :: to access one of the enum values. As for the error, please provide the full implementation of your TCP server and mention if you use threading, if so how. Also as mentioned by @koahnig new QTcpSocket(new QObject()); This leaks 2 objects one socket and one generic QObject. You need to provide a valid pointer from the object tree to make use of the automatic deletion Qt supplies for child objects.
  • QML Sandboxing

    Solved General and Desktop qml security network networkaccessma
    2
    0 Votes
    2 Posts
    2k Views
    romsharkovR
    I have now found this thread posted 2 years ago which seems very similar to what I was looking for. The solution was to create a new QML component which create a new QML engine instance and isolates the untrusted QML code inside it. That does isolate the execution context, it does't however monitor the network traffic generated by the component. In my case network communication must be restricted to a certain set of domains, so I need to intercept network going in and out of the component, any idea how?
  • 0 Votes
    7 Posts
    3k Views
    A
    It's a bug in Qt. Appears everytime. Even if disable IPv6 stack.
  • 0 Votes
    7 Posts
    3k Views
    raven-worxR
    @d1.psy so you want the cookies from the requests you already made with QtWebEngine? If so take a look at QWebEngineCookieStore (see it's signals) and "sync" the cookies into your QNAM.
  • Qml image SSL error

    Unsolved QML and Qt Quick ssl qml network
    2
    0 Votes
    2 Posts
    2k Views
    raven-worxR
    @Mkowalik-Mimesis and why does it crash? What is the value of incoming QNetworkReply* ? Are you doing any fancy deletes? in your CustomNetworkManagerFactory::create() you get a QObject* passed as a parent for the QNAM to create. But you set the parent to the this pointer instead. it would be cleaner not to couple the created QNAM with your factory class by connecting signals and slots of them. Instead you should subclass QNAM, move the onIgnoreSSLErrors() slot to it and connect it to itself instead. you are overwriting your local m_networkManager member variable everytime create() is called. Which doesn't go along with a factory implementation ;) I don't know if this already solves your crash, it may be.
  • UDPSocket Stopped Working

    Unsolved General and Desktop network udp error
    6
    0 Votes
    6 Posts
    2k Views
    mrjjM
    @M4RZB4Ni said: Hi When you dont have uSocket = new QUdpSocket(this) ; then uSocket->writeDatagram(xx will crash. as uSocket just point to random location. (dangling pointer) Next: QByteArray *priPackNuser; <<< also just a pointer. You should do ( as @SGaist mention) QByteArray priPackNuser; ( no *, means its real bytearray, not a pointer to one) So you change it from heap allocation to stack allocation. If you dont change to non pointer then you need QByteArray *priPackNuser = new QByteArray ; as else its a dangling pointer too! But no need for pointer to QByteArray here.
  • 0 Votes
    2 Posts
    2k Views
    Paul ColbyP
    The server is not returning anything useful in the HTTP headers (I wouldn't expect it to): ~/tmp$ wget -S 'http://u801.wapkafile.com//g03/video/1253022/7940/c8f9a32ef15648bfa6f693102de27835/DARNA-ZAROORI-HAI-3(Movies7.In).avi?md5=TU7ibYa85byjzJyJcH_LXQ&expires=1458916610' --2016-07-27 18:21:15-- http://u801.wapkafile.com//g03/video/1253022/7940/c8f9a32ef15648bfa6f693102de27835/DARNA-ZAROORI-HAI-3(Movies7.In).avi?md5=TU7ibYa85byjzJyJcH_LXQ&expires=1458916610 Resolving u801.wapkafile.com (u801.wapkafile.com)... 8.37.229.38 Connecting to u801.wapkafile.com (u801.wapkafile.com)|8.37.229.38|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Server: nginx Date: Wed, 27 Jul 2016 08:21:15 GMT Content-Type: video/x-msvideo Content-Length: 65707724 Connection: keep-alive Last-Modified: Wed, 31 Dec 2014 06:15:08 GMT Content-Disposition: attachment; filename="DARNA-ZAROORI-HAI-3(Movies7.In).avi" Accept-Ranges: bytes Expires: Wed, 03 Aug 2016 06:34:10 GMT Cache-Control: max-age=604800 Cache-Control: s-maxage=604800,max-age=604800 Age: 6425 X-Cache: HIT TCP_MEM_HIT dirn:0:1402323922 X-Swift-SaveTime: Wed, 27 Jul 2016 06:34:10 GMT X-Swift-CacheTime: 604800 Via: 440d210b[0,206-0,H] Length: 65707724 (63M) [video/x-msvideo] Saving to: 'DARNA-ZAROORI-HAI-3(Movies7.In).avi?md5=TU7ibYa85byjzJyJcH_LXQ&expires=1458916610.1’ So Download Manager must be getting the info from the metadata at the start of the file. For example, I only downloaded the first 70KB of the file, and: ~/tmp$ file DARNA-ZAROORI-HAI-3\(Movies7.In\).avi\?md5=TU7ibYa85byjzJyJcH_LXQ\&expires=1458916610 DARNA-ZAROORI-HAI-3(Movies7.In).avi?md5=TU7ibYa85byjzJyJcH_LXQ&expires=1458916610: RIFF (little-endian) data, AVI, 640 x 360, ~30 fps, video: H.264 X.264 or H.264, audio: MPEG-1 Layer 3 (stereo, 22050 Hz) So the info is there at the start. I expect you'll want to use a library to parse it out. I'm not sure if Qt has such functionality built-in. Perhaps have a look through the Qt Multimedia docs. Cheers.
  • 0 Votes
    17 Posts
    9k Views
    kshegunovK
    @marlenet15 Hi, Here you can find a threaded TCP server example. You can ignore the module specific classes QDaemonApplication (think of it as QCoreApplication) and QDaemonLog you can substitute with QDebug. Enjoy! Kind regards.
  • not able to download file from URL

    Unsolved General and Desktop network qnetworkrequest file
    4
    0 Votes
    4 Posts
    2k Views
    BharathiB
    QNetworkRequest req(url); reply=qnam.get(req); QObject::connect(reply,SIGNAL(finished()),this,SLOT(slotFinished()));
  • trouble using the Qt provided ftp example

    Solved General and Desktop ftp network
    9
    0 Votes
    9 Posts
    3k Views
    M
    @mrjj I could never figure out what was calling progressDialog. So after progress dialog was created, I did timer = new QTimer(this); timer->setSingleShot(true); timer->start(5000); connect(timer, SIGNAL(timeout()), this, SLOT(testing())); and void FtpWindow::testing() { progressDialog->hide(); } crude but it works. If there were a QDialog signal for isActiveWindow or hasAppeared, it would be better. But this works. Edit: ended up using progressDialog->setAttreibute(Qt::WidgetAttribute::WA_DontShowOnScreen, true);
  • 0 Votes
    15 Posts
    12k Views
    H
    @djee In My Way connectToHost To Http Server Not Working, So I Call QSslConfiguration::defaultConfiguration(); Instead.
  • 0 Votes
    17 Posts
    6k Views
    R
    It could be. Although it was working fine in previous release with Qt 5.5.1.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied