Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QSslSocket: cannot resolve SSLv2_server_method - ubuntu and android
Forum Updated to NodeBB v4.3 + New Features

QSslSocket: cannot resolve SSLv2_server_method - ubuntu and android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pyroxar
    wrote on last edited by Pyroxar
    #1

    I want create app in qml which be getting information from server by JSON.
    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.0

    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        Item {
            width: 200
            height: 150
    
            ListModel {
                id: model
            }
    
            ListView {
                id: listview
                anchors.fill: parent
                model: model
                delegate: Text {
                    text: jsondata
                }
            }
    
    
            Button {
                anchors.bottom: parent.bottom
                width: parent.width
                text: "GET Data"
                onClicked: {
                    function getData() {
                        var xmlhttp = new XMLHttpRequest();
                        var url = "http://samplechat.firebaseio-demo.com/users/jack/name.json";
    
                        xmlhttp.onreadystatechange=function() {
                            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                                myFunction(xmlhttp.responseText);
                            }
                        }
                        xmlhttp.open("GET", url, true);
                        xmlhttp.send();
                    }
    
                    function myFunction(json) {
                        var obj = JSON.parse(json);
                        listview.model.append( {jsondata: obj.first +" "+ obj.last })
                    }
    
                    getData();
    
                }
            }
        }
    }
    

    But i can't connect with server because i have an error of course.
    I had error with database driver. I had to compile driver from source.
    What happened to QT this time?
    My target platform is android so what i should can that do (and why this is not simple)?
    I have OpenSSL 1.0.2g 1 Mar 2016

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pyroxar
      wrote on last edited by Pyroxar
      #2

      Sorry that I boost this thread but My application must connect with server otherwise my application would not make sense.

      This is important for me.

      What i can do?
      QSslSocket: cannot resolve SSLv2_server_method

      1 Reply Last reply
      0
      • GTDevG Offline
        GTDevG Offline
        GTDev
        wrote on last edited by
        #3

        You are probably missing the SSL library in order to make https:// requests. You can verify this by testing if XMLHttpRequest works with URLs that do not use https.

        For Android, it is currently required to manually package the SSL library as described here: http://doc.qt.io/qt-5/opensslsupport.html

        With V-Play Engine you can avoid having to build and provide SSL for Android, V-Play has SSL already bundled since version 2.10.0.

        Senior Developer at Felgo - https://felgo.com/qt

        Develop mobile Apps for iOS & Android with Qt
        Felgo is an official Qt Technology Partner

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved