QT project without opengl - c++

I made an application with qt c++ with does not need opengl
So I did configure qt with -no-opengl option while building.
I've compiled my project qith qmake from the qt build output.
Unfortunatly while running my application in "light xp" i get the error "opengl32.dll not found"
Does anyone already done this and could help me?
Thanks

If you've kept the source you built from this is pretty straight forward, just rerun configure with OpenGL enabled and make sure you've got the dependencies and Qt will build the module and deploy for you, if not you can try downloading the OpenGL part separately and build it from the source yourself or rebuild the entire Qt library from scratch.

Related

Qmake on Windows

I have a project written in Qt that I have no problems compiling and running on Linux. The command line is:
qmake ../trunk/GSDTesting.pro
The process on Linux was really simple: install a few dependencies using apt and you are off.
My task is to recompile the same program on Windows using Visual Studio C++ compiler, but the problem is I don't know how to start. There is no such thing as qmake for Windows.
Can someone give me a few hints where to start. Please note that I don't know QT almost at all, my task is just to debug some issue unrelated to QT.
Are you using terminal exclusively on Windows? If so, maybe this image of example build steps straight from Qt Creater 4.14.2 may help you:
As you can see the image of the default Qt creator build steps list the file path where 'qmake.exe' can be located on a local installation of the toolchain.
If you can use a machine with a display I find using the Qt creator GUI is not all that bad.
Here is a link to the base get started page:
https://doc.qt.io/qt-5/gettingstarted.html
Here is a link to the installer download page:
https://www.qt.io/download
IMPORTANT:
You will need to make a Qt account, login to your account, and then download the open-source version of the API. The commercial version of the same source is acquired differently/seperately.
Otherwise, if you cannot use the GUI, can I request some clarification on why you cannot use Qt creator on your Windows installation?

deploy QML-using, QBS-built Qt application to windows

I have made an application in QtCreator
I use QML for the GUI, and I use QBS as the build system
I want to be able to deploy the application to windows (and maybe to Linux and MacOS, but right now, I'm only concerned with Windows)
I tried following the deployment tutorial for Qmake with a minimal example(using QBS to build the binary on windows, and with the MSVC2017 compiler, as of 2018-05-23 3:38 PM GMT-6 I've been trying to install MinGW with the Qt Maintenance tool for the last 6 hours, and it's still only at 5%, so I will try with MinGW once that finishes), but I have the following problem
using the Qt Quick Application - Swipe template, the release version with the MSVC2017 compiler, after using windeployqt.exe --release --qmldir ../src example.exe to get the dlls and other libraries
and trying to execute example.exe, I get a message saying
"Qml debugging is enabled. Only use this in a safe environment!"
in a cmd window, right before the actual application starts
and even if I try to disable that in the build step of the project, it doesn't get disabled
it still shows the cmd with the message, is there a way to completely make sure the build settings will work? am I missing a QtCreator configuration to make sure the settings I set actually do what they're intended? do I need to restart Qtcreator or Windows for them to work?
Update: still happens, even with MinGW
This is a bug that will be fixed in Creator 4.7. See https://bugreports.qt.io/browse/QTCREATORBUG-20377.

Offline Qt Documentation

I am trying to compile QDoc following the steps given here https://wiki.qt.io/Building_Qt_Documentation. I am trying to compile QDoc without building the whole Qt project. I use mingw in windows 10. I run first configure in the main qt directory, then configure in qtbase, then make in qtbase. I am going then in the qtdeclarative directory and try to compile sub-qmldevtools as explained in the tutorial. Unfortunately the target is not recognized and no compiling occurs. Can anyone help ?
I have finally installed the QtDocs. For Qt 5.8 it worked almost as here: https://wiki.qt.io/Building_Qt_Documentation except for make qmake_all should be called immediately after configure is called in the root directory of the sources. Also i had to compile qtattributionsscanner from qttools for the make html_docs to work.
Alternatively to compiling the documentation one could also use zealdocs, that is one offline help tool for varios software APIs.

How to make a standalone mac app using qtcreator

I have build an app using C++ and Qt on QtCreator. The result is a .app file.
Now, when I am running it from the Qt Creator it is running fine.
But when I am running it on a different machine (with no Qt installed) it is not running.
I have figured out the reason is because my .app file is not deployed properly (as there is no framework folder added in the .app)
But I am now having trouble solving it. I am following this link but not getting anywhere as it for console purely.
Is there a way I can fix it using Qt Creator?
A Qt application relies upon Qt's libraries, which must be shipped with the application, inside the built application bundle. The steps for deploying a Qt application for OS X are detailed in the documentation.
If you're not using any other libraries, besides those of Qt, you just need to run the tool macdeployqt, which is part of the Qt installation, in the bin directory. You can set this up to run as a build step in Qt Creator, but I suggest only doing it before you actually deploy the final bundle to another machine.
Calling macdeployqt will copy the necessary Qt frameworks into the bundle and setup the paths to the frameworks so that the binary in the bundle knows where to find them.
If you use any other frameworks or libraries, you need to copy those yourself and set the references to them using install_name_tool

Deployment not working and executable extension

I use Qt Creator 2.8.1 on Windows, no deployment menu (configure) available.
Cross compile for ARM target device.
I defined toolchain which is ok except GDB, cross compiler and kit (all together).
The application is built either in debug and release mode but two things I need more:
executable name is always *.exe. This is a linux ARM binary, cannot change this?
deploy not available at all (neither run menu)
I must scp by hand, change attributes and run. Can be automatic little bit?
However, I can create a batch file witch pscp but isn't suppose Qt Creator handle this?
It is only the matter of proper toolchain and deployment setup. Here you can find the screenshots of mine from my QtCreator session where you can customize the kit and deployment as you wish.
Please make sure you have the right "-spec" argument there because that will determine the toolchain used, and it is important to be set up properly.
As for the deployment, you can put the commands in there that you would otherwise put into your Windows batch file, et al.
Ok, I found the problem here, thanks stackoverflow:
Raspberry pi on Qt 5.1.1: Remote path not set
In the project .pro file must be set the remote path for deploying:
target.path = /root/john/qt
INSTALLS += target
And now, the deployment works as expected.
There is one problem more... on my XP, executable is with .exe extension. In the same project .pro file, must change:
TARGET = untitled1.exe
If anyone knows how to get ride of .exe extension, appreciate.
Thanks all for suggestions,