Solved QImage::Format_Grayscale16 not supported in 4.10.2 open source
-
Hi,
I tested for loading 16 bit images by using QImage::Format_Grayscale16 as the format with 5.13 (4.10.2) enterprise version.
I use 4.10.2 open source community version and open the same project where i am able to test 16 bit images, i get the error that the format is not supported. I go to QImage.h and add the format, my application crashes after trying to load 16 bit images
Could you please help me in solving this?
Thanks
Sachin -
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
4.10.2 open source community version
Are you talking about Qt Kit or Qt Creator (the IDE)?
If you want to useQImage::Format_Grayscale16
, you need to use Qt 5.13.0 or superior.
Please don't mix Qt Creator, which is an IDE to help to develop an application with Qt, and Qt Kit version.
QtCreator 4.10.2 is build using Qt Kit 5.13, but this has absolute no link with the Qt version you are using to build your project.
This is my QtCreator version:
Those are the Qt Kit I use to build my applications:
-
My Qt creator version is 4.10.2 and Qt kit is 5.13.2
I need an open source version as the license ends in 4 days. We have developed an application with Qtkit version 5.3.2 and creator version 4.3.2 where the code is open and there is a need to port to latest version 5.13.0 or moreI guess I have messed up with installation when i tried to install the open source version later
Could you please help me to install both Qt creator and its kit which is open source?
Thanks
Sachin -
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
My Qt creator version is 4.10.2 and Qt kit is 5.13.2
Are you sure you are using Qt kit 5.13.2?
On the screenshot, I can only see that you are using Qt Creator 4.10.2 which has been built with Qt 5.13.2.
The Qt kits your are using are defined in Tools/Options/Kits.
For example, as you can see in my previous post, I am using following kits:- Qt 5.12.6 Android ARMv7
- Qt 5.12.6 MSVC2017 32bit
- QT 5.4.2 MSVC2013 32bit
-
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
Could you please help me to install both Qt creator and its kit which is open source?
To install a Qt kit, you only need to restart Qt Maintenance Tool, which is in you Qt installation directory, per default it is
c:\Qt\MaintenanceTool.exe
on Windows systems.The select "Add or remove components"
The check LTS and Latest releases, and click Refresh to get Component list refreshed
After that, you can choose with Qt Kit you want, be aware, each Qt version has several kits (MSVC, MinGW, Android, etc.).
Only select the Qt kit you are really need to not pollute your PC!
-
This post is deleted! -
Thanks a lot for the information.
Currently, I uninstalled everything and just installed the open source Qt creator. I go to tools/option/kit and I get window as below which should be obvious as I do not have the kit.
Now I just install the unified qt package from qt website https://account.qt.io
Just wanted to clarify that I am doint the right thing
Thanks
Sachin -
@SachinBhat I think you have some bad settings in your QtCreator.
First, a Qt Kit is a combination of a Qt version + Compiler + Debugger.
So to be usable, all those elements must be present, in the awaited path to work.Qt MaintenanceTool can only install the tools which are created by Qt, for example for Windows:
- pre-builds of Qt versions (5.12.6, 5.13.2, 5.14.0, etc.) with given compiler (MSVC, MinGW, GCC, etc.)
- MinGW toolchains
- Qt Creator
- Qt 3D Studio
- etc.
If you want to use Qt 5.13.2 for MSVC 2017, you must first install MSVC 2017 on your PC, if you want to use Qt 5.13.2 for MinGW 7.3.0, you must ensure MinGW 7.3.0 is also selected in Devlopper and Designer Tools (which is the case per default).
After Qt MaintenanceTool has finished installation, (re)start Qt Creator, which will scan the C:\Qt directory to find all available Qt Kits, which will be listed under "Kits/Auto-detected", as you can see on my previous sent screenshots.
After that, you can select this kit to build and run your project.
-
I install using unified installer and select the follwing components as my application is 32 bit. I get hid api error as below
I get :-1: error: skipping incompatible ../GUI/hidapi-master/windows/debug/hidapi.dll when searching for -lhidapi
I am making sure it is 32 bit.
I got this error before and i was able to resolve when i removed 64 bit components
Sorry for bugging you continuously as I am new to this platform
Thanks
Sachin -
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
I get :-1: error: skipping incompatible ../GUI/hidapi-master/windows/debug/hidapi.dll when searching for -lhidapi
First: are you sure you need all those 6 Kits for Qt 5.13.2? To you really want to target 6 different hardware types?
Second: when do you have this error? during Qt installation or during the build of your project? -
During build of my project
-
for your first question, i need only for just one of them. I added them just to debug if hid api is using any other package
-
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
I added them just to debug if hid api is using any other package
To avoid problems and to not slow down Qt Creator launch, install only the Qt Kit you want to use, this will save space on your disk and time!
Qt Kit do never share packages, all libraries are build for a specific target + compiler combination, there no need to select all, the only things that are common are: Sources, Qt Charts, Qt Data Visualisation, Qt... -
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
During build of my project
this look like a problem with you project file
-
I do not get when i build with 5.3.2 version. So I believe it wont be a problem with my project file..
-
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
I do not get when i build with 5.3.2 version.
Interesting, which Qt Kit you are using for Qt 5.3.2:
- MSVC2013 64bit?
- MSVC2013 32bit?
- MSVC2012 32bit?
- MSVC2010 32bit?
- MinGW 4.8.2?
-
@KroMignon
I am using MinGW 4.8.2
Build build-GUI-Desktop_Qt_5_3_MinGW_32bit-Debug
I also get this error along with hid api error if it helps collect2.exe:-1: error: error: ld returned 1 exit statusThanks
Sachin -
Here are the build settings for 5.13.2
Here are the build settings for 4.8.2
Thanks
Sachin -
@SachinBhat said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
I also get this error along with hid api error if it helps collect2.exe:-1: error: error: ld returned 1 exit status
I am lost, is this project working with Qt 5.3.2 or not?
It is very hard to follow your explanations.
What is working and what is not working:- can you build with Qt 5.3.2/MinGW?
- can you run your project with Qt 5.3.2/MinGW?
- can you build with Qt 5.13.2/MinGW 32bit?
- can you run your project with Qt 5.13.2/MinGW 32bit?
-
@KroMignon said in QImage::Format_Grayscale16 not supported in 4.10.2 open source:
can you build with Qt 5.3.2/MinGW? yes
can you run your project with Qt 5.3.2/MinGW? yes
can you build with Qt 5.13.2/MinGW 32bit? No
can you run your project with Qt 5.13.2/MinGW 32bit? NoI apologise if i was not being clear.
I had a working version with 5.13.2 when i installed all the packages after only removing 64 bit ones.
I uninstalled it for getting the open source. I install with the packages selected in the image i sent. It doesn't build the project
What does the hidapi.dll require exactly?
Thanks
Sachin