Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMimeTypes library is missing in Qt Creator

QMimeTypes library is missing in Qt Creator

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 4 Posters 2.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aysenur
    wrote on last edited by
    #1

    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.

    raven-worxR 1 Reply Last reply
    0
    • A aysenur

      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.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @aysenur
      how does your include statement look like?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aysenur
        wrote on last edited by
        #3

        #include <QMimeType>
        #include <QMimeDatabase>
        When I write these, Qt Creator gives error no such file or directory error.

        raven-worxR 1 Reply Last reply
        0
        • artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #4

          Hi,
          can you please paste your .pro file here?

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • A aysenur

            #include <QMimeType>
            #include <QMimeDatabase>
            When I write these, Qt Creator gives error no such file or directory error.

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @aysenur
            thats strange, since those are part of QtCore.
            How does your .pro file look like?

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aysenur
              wrote on last edited by
              #6

              My pro file code:
              QT += core gui opengl

              Seems to be necessary on Linux

              unix: LIBS += -lGLU

              TARGET = stl-viewer
              TEMPLATE = app

              Setup an installation target

              target.path = /usr/bin
              INSTALLS += target

              SOURCES += main.cpp
              mainwindow.cpp
              stlview.cpp
              form.cpp

              HEADERS += mainwindow.h
              stlview.h
              form.h

              FORMS += mainwindow.ui
              form.ui

              RESOURCES +=
              resource.qrc

              raven-worxR 1 Reply Last reply
              0
              • A aysenur

                My pro file code:
                QT += core gui opengl

                Seems to be necessary on Linux

                unix: LIBS += -lGLU

                TARGET = stl-viewer
                TEMPLATE = app

                Setup an installation target

                target.path = /usr/bin
                INSTALLS += target

                SOURCES += main.cpp
                mainwindow.cpp
                stlview.cpp
                form.cpp

                HEADERS += mainwindow.h
                stlview.h
                form.h

                FORMS += mainwindow.ui
                form.ui

                RESOURCES +=
                resource.qrc

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by raven-worx
                #7

                @aysenur
                but your project compiles even QtCreator says the file doesn't exist?

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  aysenur
                  wrote on last edited by
                  #8

                  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 = app

                  Setup an installation target

                  target.path = /usr/bin
                  INSTALLS += target

                  SOURCES += main.cpp
                  mainwindow.cpp
                  stlview.cpp
                  form.cpp

                  HEADERS += mainwindow.h
                  stlview.h
                  form.h

                  FORMS += mainwindow.ui
                  form.ui

                  RESOURCES +=
                  resource.qrc

                  If 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.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    aysenur
                    wrote on last edited by
                    #9

                    I have qt4 under /usr/include and also in home directory qt5.7. My Qt Creator looks the files under qt4. How can I change this? Do I need to erase qt4 files and copy qt5.7 files under /usr/include? Thank you inadvance.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      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.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • A Offline
                        A Offline
                        aysenur
                        wrote on last edited by
                        #11

                        Thank you so much. I have downloaded Qt5.9.1 and deleted the Desktop kit which looks to qt4. Opened the project again and selected Desktop kit for 5.9.1. System does not give error for QMimeType library anymore.

                        1 Reply Last reply
                        2

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved