So I just migrated a working application from Qt 6.1.2 to Qt 6.4.2. Pressed play in QtCreator and everthing ran, particularly the connection to a remote server which is done via HTTPS. I use QSslSocket::supportsSsl() to check that everything is ok with SSL and if it's not I close the application. So the fact the application opens means that everything is where it is.
I do however get this in the QtCreator console:
qt.tlsbackend.ossl: Failed to load libssl/libcrypto.
However it does work fine. I have tested.
Once I have this working I run windeployqt by doing
PATH/TO/windeployqt --qmldir PATH/TO/qmldir PATH/TO/myapp.exe
It runs and no errors. But now the application won't run neither from QtCreator (pressing play) nor from double clicking the executable. QtCreator console now throws THIS error:
qt.network.ssl: No functional TLS backend
I made sure that the libcrypto and libssl libraries (the same one in the OpenSSL directory installed by Qt Maintainer and in the bin directory of QtCreator) are in the executable's directory.
But I have no Idea why it is not working anymore. This exact same process worked on Qt 6.1.2 with no issues.
Any ideas?
EDIT: UPDATE: So I've been fooling around. And I found the following interesting tidbit. If I delete the QtCore6.dll from the executable directory where I ran the windeployqt, then I can launch the application from QtCreator again. I don't know if this helps anyone help me, but I'm putting it here just in case.
This question already has answers here:
Deploy Qt5 QML application
(8 answers)
Closed 4 years ago.
Im trying to deploy a set of QT applications. On linux all applications works fine after installing all dependencies, but in windows QtQuick based applications doesn't work at all.
To deploy on windows I follow this steps:
Compile my project in release mode.
Add mingw to the system environment path
Run windeployqt.exe --release c:\myappdir\relesase\myapp.exe
When step 3 is finish I got a lot of dlls in the release folder Qt5Quick.dll among them. But myapp.exe doesn't work and didn't threw any error.
In order to get any extra information I add console to my CONFIG parameter under myapp.pro file and running myapp.exe by console I got this info:
QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:-1 module "QtQuick" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
My version of QtSDK is 5.10.0 with MinGW so this solution doesn't work at all, I got more errors.
More over if I try to run myapp.exe without those dll in the root folder it works fine.
I been the whole day trying to find any solutions but nothing seems to work.
I'm pretty sure I missing something but I don't know whats is it.
Thanks
As I suppose, I was missing something. --qmldir option is needed in order to add QtQuick modules.
windeployqt.exe --qmldir . --release c:\myappdir\relesase\myapp.exe
That line did the trick,
Thanks #frank osterfeld and #Felix
I downloaded Qt5.6 VS2013 32bit and try to run the official example of QtWebEngine.
I just followed the instruction but
When linking it gives out an error of
LNK1104 file not found c:\Users\qt\work\install\lib\Qt5Widgetsd.lib.
However, I have no idea of where this path c:\Users\qt\work\install\lib\ comes from.
I did text search in all directories of example folder and no hits other than generated files(makefiles and pdbs).
I also checked system environment variables but no hits.
Furthermore, I checked Qt Creator'r Projects panel and its Build Environment and still no hits.
Did I miss something?
P.S. this error was given out by linking DemoBrowser example of QtWebEngineWidgets pro
The link is generated by qmake when it generates the build scrip from the qt project file (*.pro). It is based from the qmake application path that is generaly installed together with the libraries (check you qt kit setup to change it if needed: Jst browse to qmake.exe application).
Then try regenerate the build script. It should fix the issue.
You may also have issue with installation not being in debug mode; you are trying to use Qt5Widgetsd.lib library instead of the non-debug one Qt5Widgets.lib
I am trying to install kde-connect following this.
Although my kubuntu version is 14.04, I wanted to compile them so that I can have the latest version. But when I followed the instructions to compile, i get the following error.
-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /home/vinaychandra/Downloads/t/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 (message):
Unable to compile a basic Qt application. Qt has not been found correctly.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:7 (find_package)
Please point out how to correct this.
I have tried giving -DQT_QT_INCLUDE_DIR=/usr/share/qt4/
then it tells that You must build your code with position independent code if Qt was built with -reduce-relocations.
Your cmake by default uses a different QT version.
So, you must explicitly tell him which version of QT he have to use for this job.
This one
-DQT_QT_INCLUDE_DIR=/usr/share/qt4/
Is wrong because you mustn't give QT position explicitly.
All you need is to use the right qmake.
So, give'em this flag and you'll be happy!
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
Since most of kde applications are not ported to Qt5, you need Qt4.x for building kdeconnect(don't know x, mine is 4.8.6).
Also Qt4 installer is not available (I think !), so you have to build it also from source. Building Qt4 is quite easy, just download the source and run the usual commands.
After building it, it qmake name will be qmake-qt4 in /usr/bin.
So for building kdeconnect, first run its cmake, then a Cmaketextcache.txt file will form.
In that change the path of qmake (i.e somewhere written /usr/bin/qmake to /usr/bin/qmake-qt4) and also the path of qt include dir to (I think /usr/include/qt5 to /usr/include/qt4), and run the cmake again.
If some packages are missing, then you have to install it.
But with the above changes, you will get a make file to install it.
Unfortunately, the cited documentation is lagging behind the current state of kdeconnect. I ran into similar problems but I managed to solve them by installing the following required packages from the Kubuntu repositories:
sshfs
libfakekey-dev
libxtst-dev
libqca2-dev
libqjson-dev
I trust these are all of them. I installed kdeconnect from the latest git commit and it seems to run fine.
This answer comes a bit late, but this is the first Google search result for the question. In systems with qtchooser (Kubuntu, Ubuntu at least), this can be fixed by running first:
export QT_SELECT=qt4
This makes all of the Qt build tools to default to the Qt4 version instead of Qt5. You can check which Qt version is active by running:
qmake --version
Try kde connect install on ubuntu: https://fazlerabbi37.github.io/blogs/install_kde_connect_in_ubuntu_18.04.html
(in 18.04 & 19.04 it works with simple sudo apt install kdeconnect
Install kde connect on android device (google play store is where I installed from)
Invoke kde connect from desktop
Invoke kde connect from android and search device.
Your ubuntu will be found / initiating a search from desktop results in android phone pulled up for pairing
Accept pairing request
Provide access to folders
Try clicking on a video/image file for transfer
I could see the new file transferring in /Downloads folder of desktop
allowing/disallowing desktop to access sms, notifications etc are now a choice
Note: Pl treat this with pinch of salt. This appears very simple, effective for a main reason it worked for me in no time.
I have just purchased a Macbook (yes I am a complete noob on Mac though I have some considerable experience with Linux) and I'm trying to build my Qt application on it. I have installed XCode and the Qt SDK but when I try to build my project on Qt Creator all I get is the following error during qmake:
Running build steps for project TimeTracker...
Starting: "/usr/bin/qmake" /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro -r -spec macx-g++
Failure to open file: /Developer/Applications/Qt/Makefile
Unable to generate makefile for: /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro
The process "/usr/bin/qmake" exited with code %2.
Error while building project TimeTracker (target: Desktop)
When executing build step 'qmake'
Any ideas on what is going on? /Developer/Applications/Qt/Makefile indeed does not exist.
EDIT:
Ok, I know what is going on but I don't know how to fix it. When I ran qmake from the terminal everything went just fine. I believe that Qt Creator is trying to build my application on the Qt directory itself and it does nt have permission for it (it shouldn't anyway).
How do I tell Qt Creator where to build my application? I didn't find it anywhere and setting the DESTDIR variable isn't helping.
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
I was battling with the same thing. What helped eventually was resetting the default build directory here: