QMimeTypes library is missing in Qt Creator
-
Hello,
I have a binary stl file but in the code I need to convert this file to Ascii. When I searched on the web, there is a library which is called QMimeType and another one is QMimeDatabase added to Qt. But my Qt Creator gives error when I add these to my code. Error is: no such file or director.
How can I solve this problem? Thank you in advance. -
Hello,
I have a binary stl file but in the code I need to convert this file to Ascii. When I searched on the web, there is a library which is called QMimeType and another one is QMimeDatabase added to Qt. But my Qt Creator gives error when I add these to my code. Error is: no such file or director.
How can I solve this problem? Thank you in advance.@aysenur
how does your include statement look like? -
#include <QMimeType>
#include <QMimeDatabase>
When I write these, Qt Creator gives error no such file or directory error.@aysenur
thats strange, since those are part of QtCore.
How does your .pro file look like? -
My pro file code:
QT += core gui openglSeems to be necessary on Linux
unix: LIBS += -lGLU
TARGET = stl-viewer
TEMPLATE = appSetup an installation target
target.path = /usr/bin
INSTALLS += targetSOURCES += main.cpp
mainwindow.cpp
stlview.cpp
form.cppHEADERS += mainwindow.h
stlview.h
form.hFORMS += mainwindow.ui
form.uiRESOURCES +=
resource.qrc -
My pro file code:
QT += core gui openglSeems to be necessary on Linux
unix: LIBS += -lGLU
TARGET = stl-viewer
TEMPLATE = appSetup an installation target
target.path = /usr/bin
INSTALLS += targetSOURCES += main.cpp
mainwindow.cpp
stlview.cpp
form.cppHEADERS += mainwindow.h
stlview.h
form.hFORMS += mainwindow.ui
form.uiRESOURCES +=
resource.qrc@aysenur
but your project compiles even QtCreator says the file doesn't exist? -
Sorry I send the pro file which only has QtMimeData library.
QT += core gui opengl
Seems to be necessary on Linux
unix: LIBS += -lGLU
TARGET = stl-viewer
TEMPLATE = appSetup an installation target
target.path = /usr/bin
INSTALLS += targetSOURCES += main.cpp
mainwindow.cpp
stlview.cpp
form.cppHEADERS += mainwindow.h
stlview.h
form.hFORMS += mainwindow.ui
form.uiRESOURCES +=
resource.qrcIf you compile this code you will see the error. This code looks to the file under /usr/include/qt4 and qt4 does not have mimetype library files. I downloaded qt5.7 now and I will create a new project which will work with 5.7.
-
Hi,
No you don't. Go to the Build and Run part of Qt Creator's settings. There add your Qt 5.7 to the Qt versions if not available and then create a kit using it. Finally, build your project using that kit.