QtWebKit/QWebView: No such file or directory - c++

I am trying to build a an example that I found at https://github.com/tranter/qt-google-calendar/. When I go to build I get an error stating that there is no such directory for QtWebKit/QWebView. I am on Qt 4.8.6 and have confirmed that QT += webkit is in the *.pro file. I can confirm that my version of Qt was compiled with the -webkit option configured. I am using Ubuntu 14.04 and libqtwebkit-dev is installed. Any ideas what else could be causing this?
To clarify, the exact error is QtWebKit/QWebView: No such file or directory it points to the instance of include <QtWebKit/QWebView> in ui_logindialog.h

Related

Error deploying Qt application on OS X

I'm trying to deploy a Qt application on OS X using macdeployqt:
macdeployqt MyApplication.app -dmg
The application uses the Qwt library, which is being included in the PRO file as follows:
macx: QWT_ROOT = /usr/local/qwt-6.1.0
include ( $${QWT_ROOT}/features/qwt.prf )
When I run the macdeployqt command I get the following error message:
ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
I'm not sure but it seems the deployment step is looking for the Qwt library on the wrong path, for example:
"/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"
When it should be:
"/Library/Frameworks/qwt.framework/Versions/6/qwt"
How can I solve it?
I have uninstalled other qt versions using brew list, brew remove qt and brew remove qt5. I also noted that I had pyqt installed (and I was not using it), so I also remove it using brew remove pyqt.
Then, I have reinstalled Qt 5.3.2 and had other issues:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Which was solved changing the isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))) command from the Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf file to isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))), as explained here: Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
and
Could not resolve SDK path for 'macosx10.8'
That was solved by changing the QtPath/5.3/clang_64/mkspecs/qdevice.pri from !host_build:QMAKE_MAC_SDK = macosx10.8 to !host_build:QMAKE_MAC_SDK = macosx10.12, as explained here: Error: Could not resolve SDK path for 'macosx10.8'
So, I run the command from my Qt directory:
/Users/kuser/Qt5.3.2/5.3/clang_64/bin/macdeployqt MyApplication.app -dmg
and it worked.
I found these solutions in comments from the following question:
Qt5 cannot find platform plugins Mac OS X
Note: this does not solve the macdeployqt error directly, but as it is part of the Qt installation, reinstalling it solved my problem.

Cannot add qmake files to Qt Versions [armhf]

I installed qt4-qmake:armhf and qt5-qmake:armhf but I cannot add it to Qt Versions in Qt Creator manually. I get error:
The qmake executable could not be added: qmake""is not an executable.
What else should I try?
I am using windows right now, but searching file list for the 2 packages in debian repository online it seems that that qmake is located in:
/usr/bin/qmake-qt4 for qt4
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
for qt5

qwt build - qmake build (Qt 5.3)

I want to compile the qwt library using qt 5.3. Previously I had older versions of Qt. So, when I call the Qt 5.3.0 32-bit for Desktop (MSVC 2012 OpenGL) shell and move to the directory, which contains qwt (C:\qwt-6.1.0), then perform qmake qwt.pro I get this error:
Cannot read c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf: The system cannot find
the path specified. Could not read qmake configuration
file c:/Qt/Qt5.0.2/mkspecs/win32-msvc2010/qmake.conf.
Error processing project file: C:\qwt-6.1.0\qwt.pro
Calling:
qmake -set QMAKESPEC "C:\Qt_5.3\5.3\msvc2012_opengl\mkspecs\win32-msvc2012\"
Does not help.
PS. Solution is found! I've tried not to do like is in qwt tutorial, simple open *.pro file by Qt Creator. After this just "build" and everything was done. Without console

Can't compile Qt Creator

I'm trying to compile Qt Creator source code and got the following error message:
fatal error: QtCore/private/qwineventnotifier_p.h : No such file or directory.
I'm on Win XP SP3 using QtSDK version 1.1.3, MinGW (g++ 4.5.2). In the QtCore folder of the QtSDK includes there is no any folder named private, and searching for qwineventnotifier_p.h yielded nothing. What can i do?
[Edit:]
Apparently there's an issue with this recently:
https://bugreports.qt-project.org//browse/QTCREATORBUG-3701
https://bugreports.qt-project.org//browse/QTBUG-17218
You my try getting the file from somewhere, e.g.:
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2-browser/df/d69/src_2corelib_2kernel_2qwineventnotifier__p_8h-source.html
But I can't tell if this will be enough or if Qt Creator will rely on the actual sources for that header file.

Static build in Qt on Windows Vista

I am currently running Windows Vista Home Premium, and I have developed an application with my friend using Qt Creator. We are now trying to deploy our application as just one executable, so we are trying to do a static build. We have added CONFIG += static in our .pro file.
We are using this documentation to help us:
http://doc.trolltech.com/4.1/deployment-windows.html
When I try to build QT, I use this command:
configure -static -platform win32-msvc
Then I get this error:
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
I think I have to add nmake to my PATH, but I can't find it on my computer. Any help would be greatly appreciated. Thank you.
You will find a batch file under the bin directory of your visual studio install called "vcvars32.bat". Run that from the command line before you try building QT. That should solve your problems.
Open Visual Studo 20xx Command Prompt and compile Qt inside it!
For instance, on VS2008 I also need to set QMAKESPEC before trying to configure Qt:
set QMAKESPEC=<QT_DIR>\mkspecs\win32-msvc2008