Solved Qt and Octopart API
-
Hi and welcome to devnet,
What OS are you on ?
I'm guessing Windows. If that's the case, did you install OpenSSL on your machine ?
-
also
apikey=EXAMPLE_KEY
probably needs to be replaced with a valid key -
Hello again.
I installed OpenSSL but i keep getting the same errors. The URL i was using was wrong, but after correction, the errors continue.
The API Key Example can be used for a specific search, so i dont think that is the problem.
-
What OS are you running ?
-
Hi.
Currently i'm running on Windows 10.
-
@jemazter said in Qt and Octopart API:
I installed OpenSSL but i keep getting the same errors
Following is important here:
- what version of OpenSSL?
- is the path to the OpenSSL DLLs in the PATH env variable, so the application can find and load it? Alternatively you can copy the 2 DLLs right next to your application exe (or to be more specific here: into the current working directory, which might not necessarily be the directory the exe is in when starting the application from QtCreator for example)
-
@raven-worx said in Qt and Octopart API:
@jemazter said in Qt and Octopart API:
I installed OpenSSL but i keep getting the same errors
Following is important here:
- what version of OpenSSL?
- is the path to the OpenSSL DLLs in the PATH env variable, so the application can find and load it? Alternatively you can copy the 2 DLLs right next to your application exe (or to be more specific here: into the current working directory, which might not necessarily be the directory the exe is in when starting the application from QtCreator for example)
Hi.
I installed v1.1.0c. I installed it using an executable from this page (slproweb.com/products/Win32OpenSSL.html). Which DLLs should i copy to project folder?
Thanks.
-
@jemazter
OpenSSL 1.1.x support is still missing...see QTBUG-52905
You need to stick to OpenSSL 1.0.x for now. -
I installed v1.0.2j, copied the DLLs to project folder, and still the same errors.
Sorry for the many questions, i'm a newbie to Qt and this is the first "complicated project" i'm doing om my own.
-
@jemazter said in Qt and Octopart API:
I installed v1.0.2j, copied the DLLs to project folder, and still the same errors.
as i said before, this approach still has some pitfalls. You can do this once your application is ready for release.
For now it's easier to add the path to DLLs to the PATH variable, and make sure you restart QtCreator after doing this.
If you don't want to change the system env variables, you can also set the PATH variable in QtCreator directly, then they only take effect for the started application (from within QtCreator). -
Thanks to everybody for the help.
I found out that the errors Qt was showing could be ignored for my application. I probably had other errors in my code, because of that i had no responses from the server, that led me to believe that that errors were the cause to no response from the server.
I was researching about network use in Qt and found this tutorial that coud be useful in the future for someone viewing this thread. It really solved some doubts and it worked here with Octopart API Server. (https://youtu.be/_gSC60y8woA)