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. Build error with QTextToSpeech in QT6.4.0
Forum Updated to NodeBB v4.3 + New Features

Build error with QTextToSpeech in QT6.4.0

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 774 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.
  • I Offline
    I Offline
    itorin
    wrote on last edited by
    #1

    Hi all, I'm using Qt 6.4 on macOS. I am trying to convert my TextToSpeech application for Qt 5.15 to Qt 6.4, but I'm stuck.
    My procedure is as follows:

    1. Open Qt Creator
    2. [Create Project...]->"Qt widget application" (all defaults thereafter except "qmake" as build system)
    3. add "QT += texttospeech" into .pro file.
    4. add "#include <QTextToSpeech>" into mainwindow.cpp.
    5. Build it, then I got "In included file: 'QtQmlIntegration/qqmlintegration.h' file not found" error.

    How to solve it? Any additional configuration in .pro file in Qt 6.4?

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

      Hi and welcome to devnet,

      What if you use the include of the class you actually use rather than the module wide include ?

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

      I 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        What if you use the include of the class you actually use rather than the module wide include ?

        I Offline
        I Offline
        itorin
        wrote on last edited by
        #3

        @SGaist
        Thank you for your reply on my question!
        You mean that I don't need the line "QT+=texttospeech" module definition?
        It seems to be needed to turn on the tts functionality.

        Anyway, I found a workaround.
        Add the line below to .pro file.
        INCLUDEPATH += /Qt_installed_path/6.4.0/macos/include/

        In Step 4 of my above explanation, "#include <QTextToSpeech>" reads the file "/Qt_installed_path/6.4.0/macos/lib/QtTextToSpeech.framework/Versions/A/Header/QTextToSpeech" and the contents of this file is only one line:
        $ cat QTextToSpeech
        #include "qtexttospeech.h"

        At the line 17 of qtexttospeech.h, there is "#include <QtQmlIntegration/qqmlintegration.h>".
        The file, qqmlintegration.h is there at "/Qt_installed_path/6.4.0/macos/include/".
        Clang does not seem to search header files in"/Qt_installed_path/6.4.0/macos/include/“ directory.
        So, we need add this directory to INCLUDEPATH.

        However, it looks ad-hoc workaround.
        Can anyone know the essential solution?

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

          My bad !
          I forgot that there was a class named like that and mixed it which the module wide include.

          As a workaround, I think (I don't have my machine at hand right now) you can add QT += qml to your .pro file.

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

          I 1 Reply Last reply
          1
          • SGaistS SGaist

            My bad !
            I forgot that there was a class named like that and mixed it which the module wide include.

            As a workaround, I think (I don't have my machine at hand right now) you can add QT += qml to your .pro file.

            I Offline
            I Offline
            itorin
            wrote on last edited by
            #5

            @SGaist
            "QT += qml" solved my problem!
            Thank you for your help!

            1 Reply Last reply
            0

            • Login

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