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. No QWebEngineCallback Qt5.6.3 Ubuntu16.04

No QWebEngineCallback Qt5.6.3 Ubuntu16.04

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 4 Posters 6.0k Views
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #6

    Did you took a look at Qt's CMake manual ?

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

    P 1 Reply Last reply
    0
    • P Offline
      P Offline
      patrik08
      wrote on last edited by
      #7

      Hi...
      Cmake make a super job...
      this tool find all crumbs....
      last night i try to build QTAV video sdk module to qt5 https://github.com/wang-bin/QtAV
      on qmake only error... to find libs..
      on cmake after 10 min all was build & example to...

      # WebEngine support
      	IF(USE_QTWEBENGINE)
      		FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} QUIET COMPONENTS WebEngine WebEngineWidgets WebChannel)
      
      		SET(BALL_HAS_QTWEBENGINE TRUE)
      		IF(NOT Qt5WebEngine_FOUND)
      			MESSAGE(STATUS "QtWebEngine has not been found. Disabling WebEngine support.")
      			SET(BALL_HAS_QTWEBENGINE FALSE)
      		ENDIF()
      
      		IF(NOT Qt5WebEngineWidgets_FOUND)
      			MESSAGE(STATUS "QtWebEngineWidgets has not been found. Disabling WebEngine support.")
      			SET(BALL_HAS_QTWEBENGINE FALSE)
      		ENDIF()
      
      		IF(NOT Qt5WebChannel_FOUND)
      			MESSAGE(STATUS "QtWebChannel has not been found. Disabling WebEngine support.")
      			SET(BALL_HAS_QTWEBENGINE FALSE)
      		ENDIF()
      
      		IF(BALL_HAS_QTWEBENGINE)
      			LIST(APPEND VIEW_DEP_LIBRARIES Qt5::WebEngineWidgets Qt5::WebChannel)
      		ENDIF()
      	ENDIF()
      

      https://blog.kitware.com/cmake-finding-qt5-the-right-way/

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Did you took a look at Qt's CMake manual ?

        P Offline
        P Offline
        PatrickK
        wrote on last edited by
        #8

        @SGaist with the same version of the software, cmake and Qt every thing is run well. Only when a new feature that requires

        #include <QtWebEngineWidgets\QWebEngineView>
        #include <QtWebEngineCore\QWebEngineCallback>

        in its header is added to the code, cmake gives an error as:

        ....cxx:14:45: fatal error: QtWebEngineWidgets\QWebEngineView: No such file or directory
        #include <QtWebEngineWidgets\QWebEngineView>

        1 Reply Last reply
        0
        • P patrik08

          Hi...
          Cmake make a super job...
          this tool find all crumbs....
          last night i try to build QTAV video sdk module to qt5 https://github.com/wang-bin/QtAV
          on qmake only error... to find libs..
          on cmake after 10 min all was build & example to...

          # WebEngine support
          	IF(USE_QTWEBENGINE)
          		FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} QUIET COMPONENTS WebEngine WebEngineWidgets WebChannel)
          
          		SET(BALL_HAS_QTWEBENGINE TRUE)
          		IF(NOT Qt5WebEngine_FOUND)
          			MESSAGE(STATUS "QtWebEngine has not been found. Disabling WebEngine support.")
          			SET(BALL_HAS_QTWEBENGINE FALSE)
          		ENDIF()
          
          		IF(NOT Qt5WebEngineWidgets_FOUND)
          			MESSAGE(STATUS "QtWebEngineWidgets has not been found. Disabling WebEngine support.")
          			SET(BALL_HAS_QTWEBENGINE FALSE)
          		ENDIF()
          
          		IF(NOT Qt5WebChannel_FOUND)
          			MESSAGE(STATUS "QtWebChannel has not been found. Disabling WebEngine support.")
          			SET(BALL_HAS_QTWEBENGINE FALSE)
          		ENDIF()
          
          		IF(BALL_HAS_QTWEBENGINE)
          			LIST(APPEND VIEW_DEP_LIBRARIES Qt5::WebEngineWidgets Qt5::WebChannel)
          		ENDIF()
          	ENDIF()
          

          https://blog.kitware.com/cmake-finding-qt5-the-right-way/

          P Offline
          P Offline
          PatrickK
          wrote on last edited by PatrickK
          #9

          @patrik08 thank you for the sample code and the link. But I don't know which part of the code should change to the new style, find_package(Qt5 COMPONENTS ... ... REQUIRED). Currently it finds the required libraries automatically and asks for them which I address one by one. For example, the cmake flags after configuration, look like

          Qt5Charts_DIR .../Qt56/5.9.1/gcc_64/lib/cmake/Qt5Charts
          Qt5Core_DIR .../Qt56/5.6.3/gcc_64/lib/cmake/Qt5Core

          jsulmJ 1 Reply Last reply
          0
          • P PatrickK

            @patrik08 thank you for the sample code and the link. But I don't know which part of the code should change to the new style, find_package(Qt5 COMPONENTS ... ... REQUIRED). Currently it finds the required libraries automatically and asks for them which I address one by one. For example, the cmake flags after configuration, look like

            Qt5Charts_DIR .../Qt56/5.9.1/gcc_64/lib/cmake/Qt5Charts
            Qt5Core_DIR .../Qt56/5.6.3/gcc_64/lib/cmake/Qt5Core

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #10

            @PatrickK Did you try

            #include <QWebEngineView>
            

            ?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply
            0
            • jsulmJ jsulm

              @PatrickK Did you try

              #include <QWebEngineView>
              

              ?

              P Offline
              P Offline
              PatrickK
              wrote on last edited by
              #11

              @jsulm after separation of the two sentences in the header, i.e.,

              #include <QtWebEngineWidgets\QWebEngineView>
              #include <QtWebEngineCore\QWebEngineCallback>

              into four sentences such as

              #include <QWebEngineCallback>

              then it does not complain any more that some files do not exist but it gives many errors like

              /home/v/software/itk482v2/source/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:387:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive]
              static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);

              P 1 Reply Last reply
              0
              • P PatrickK

                @jsulm after separation of the two sentences in the header, i.e.,

                #include <QtWebEngineWidgets\QWebEngineView>
                #include <QtWebEngineCore\QWebEngineCallback>

                into four sentences such as

                #include <QWebEngineCallback>

                then it does not complain any more that some files do not exist but it gives many errors like

                /home/v/software/itk482v2/source/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:387:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive]
                static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);

                P Offline
                P Offline
                PatrickK
                wrote on last edited by PatrickK
                #12

                I also tried Qt5.7 instead of 5.9. This time the headers, i.e,

                #include <QtWebEngineWidgets\QWebEngineView>
                #include <QtWebEngineCore\QWebEngineCallback>

                had no problem (and perhaps I should change the title to solved); however, it gives many errors like the below one:

                /home/v/software/itk482v2/source/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:387:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive]
                static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);

                The original code is run well but when a new cxx containing these two headers are added, it gives this problem and only in my system, Ubuntu 16.04 not in the Visual Studio.

                jsulmJ 1 Reply Last reply
                0
                • P PatrickK

                  I also tried Qt5.7 instead of 5.9. This time the headers, i.e,

                  #include <QtWebEngineWidgets\QWebEngineView>
                  #include <QtWebEngineCore\QWebEngineCallback>

                  had no problem (and perhaps I should change the title to solved); however, it gives many errors like the below one:

                  /home/v/software/itk482v2/source/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_numeric_traits.h:387:60: error: ‘constexpr’ needed for in-class initialization of static data member ‘const float vnl_numeric_traits<float>::zero’ of non-integral type [-fpermissive]
                  static const float zero VCL_STATIC_CONST_INIT_FLOAT_DECL(0.0F);

                  The original code is run well but when a new cxx containing these two headers are added, it gives this problem and only in my system, Ubuntu 16.04 not in the Visual Studio.

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #13

                  @PatrickK Try to add

                  CONFIG += c++11
                  

                  to your pro file, run qmake and then rebuild.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply
                  1
                  • jsulmJ jsulm

                    @PatrickK Try to add

                    CONFIG += c++11
                    

                    to your pro file, run qmake and then rebuild.

                    P Offline
                    P Offline
                    PatrickK
                    wrote on last edited by
                    #14

                    @jsulm thank you. How can I write it in a cmakelists.txt or ctestconfig.cmake file? The code doesn't have a .pro file.

                    jsulmJ 1 Reply Last reply
                    0
                    • P PatrickK

                      @jsulm thank you. How can I write it in a cmakelists.txt or ctestconfig.cmake file? The code doesn't have a .pro file.

                      jsulmJ Online
                      jsulmJ Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      @PatrickK See https://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      P 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @PatrickK See https://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake

                        P Offline
                        P Offline
                        PatrickK
                        wrote on last edited by PatrickK
                        #16

                        @jsulm thank you for the link. I added that term and didn't solve the problem. I also tried with two further below terms:

                        set(CMAKE_CXX_STANDARD_REQUIRED ON)
                        set(CMAKE_CXX_EXTENSIONS OFF)

                        but still cmake gives that error. The software is itk-snap and it works fine with Qt5.7 and msvc 2015 but in linux still I cannot compile it with Qt 5.7 and higher versions.

                        jsulmJ 1 Reply Last reply
                        0
                        • P PatrickK

                          @jsulm thank you for the link. I added that term and didn't solve the problem. I also tried with two further below terms:

                          set(CMAKE_CXX_STANDARD_REQUIRED ON)
                          set(CMAKE_CXX_EXTENSIONS OFF)

                          but still cmake gives that error. The software is itk-snap and it works fine with Qt5.7 and msvc 2015 but in linux still I cannot compile it with Qt 5.7 and higher versions.

                          jsulmJ Online
                          jsulmJ Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #17

                          @PatrickK I actually mean this

                          set (CMAKE_CXX_STANDARD 11)
                          

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          P 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @PatrickK I actually mean this

                            set (CMAKE_CXX_STANDARD 11)
                            
                            P Offline
                            P Offline
                            PatrickK
                            wrote on last edited by
                            #18

                            @jsulm right. First I added only this term (set (CMAKE_CXX_STANDARD 11)) that didn't solve the problem. Then I added each of
                            set(CMAKE_CXX_STANDARD_REQUIRED ON)
                            set(CMAKE_CXX_EXTENSIONS OFF)
                            one by one to the code and once together, but still it cannot be compiled and gives the same error message.

                            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