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. How do I install QtCompositor module?
Forum Updated to NodeBB v4.3 + New Features

How do I install QtCompositor module?

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 2 Posters 5.0k 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.
  • ArasA Offline
    ArasA Offline
    Aras
    wrote on last edited by
    #1

    I want to give wayland a try and reading through some online documentation I understand I need to install QtCompositor module which does not automatically get installed with installation of Qt.

    I found this documentation but it seems out dated.

    I am using Ubuntu Linux 17.20 and Qt5.9.2. Can anyone point me to up to date instructions on how to install QTCompositor or detail instructions on how to get started with QtWayland? I am assuming that is what I should use to access wayland API from Qt. Any help is much appreciated!

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

      Hi,

      QtWayland is now part of the Qt distribution, you can start from here.

      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
      2
      • ArasA Offline
        ArasA Offline
        Aras
        wrote on last edited by
        #3

        @SGaist thank you for the reply but although I have a recent installation of Qt distribution (5.9.2 binary) I still get the following error:

        QQmlApplicationEngine failed to load component
        qrc:///main.qml:4 module "QtWayland.Compositor" is not installed
        

        Thanks for the link. I tried running the minimal example mentioned on that link, but I still get the above error.

        Any ideas why, or how I could install QtWayland.Compositor module?

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

          When you say binary, do you mean from the online/offline installer ?

          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
          • ArasA Offline
            ArasA Offline
            Aras
            wrote on last edited by
            #5

            Yes I download qt-opensource-linux-x64-5.9.2.run offline installer a few weeks ago and installed it.

            More info about my system just in case:

            Linux 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
            ~$ qmake -v
            QMake version 3.1
            Using Qt version 5.9.2 in /home/aras/Qt5.9.2/5.9.2/gcc_64/lib
            

            Thanks!

            1 Reply Last reply
            0
            • ArasA Offline
              ArasA Offline
              Aras
              wrote on last edited by
              #6

              Looks like there is an open bug for this issue: https://bugreports.qt.io/browse/QTBUG-63011
              I also found another thread on this forum that does not have an answer:.
              If it is a bug I'd love to know if there is a workaround. There must be a way right?

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

                Well, I think that QTBUG-60601 is even more relevant to your case. Short version: build the module from source.

                Download the source from the installer and then the classic /path/to/Qt/5.9.X/gcc_64/bin/qmake && make && make install

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

                ArasA 1 Reply Last reply
                0
                • SGaistS SGaist

                  Well, I think that QTBUG-60601 is even more relevant to your case. Short version: build the module from source.

                  Download the source from the installer and then the classic /path/to/Qt/5.9.X/gcc_64/bin/qmake && make && make install

                  ArasA Offline
                  ArasA Offline
                  Aras
                  wrote on last edited by Aras
                  #8

                  @SGaist do you mean I should build qt itself from source? Are you sure? It does look like QtWayland is installed along with Qt. I have a folder called ~/Qt5.9.2/5.9.2/Src/qtwayland which I think is the wayland module. Is it possible it is installed but just not available for some reason?

                  I also found this other open bug that suggest wayland module needs a qmldir file. Do you know what file it is talking about? What should I put in that file and were do I place it to fix it.

                  I kind of like developing against the binary version of Qt. It is a lot of work to build it from source (sorry I know I am lazy). Thanks!

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

                    That bug is for a static compilation which is not what you are going to do.

                    Build only the QtWayland module, not the whole of Qt.

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

                    ArasA 1 Reply Last reply
                    2
                    • SGaistS SGaist

                      That bug is for a static compilation which is not what you are going to do.

                      Build only the QtWayland module, not the whole of Qt.

                      ArasA Offline
                      ArasA Offline
                      Aras
                      wrote on last edited by
                      #10

                      @SGaist ok I'll give it a go. Can you specify where I should download the source for this module from?

                      1 Reply Last reply
                      0
                      • ArasA Offline
                        ArasA Offline
                        Aras
                        wrote on last edited by Aras
                        #11

                        @SGaist is it good to clone from https://code.qt.io/cgit/qt/qtwayland.git/ and build it? The path does not look like what you suggested but I think it is the same module. yes?

                        1 Reply Last reply
                        0
                        • ArasA Offline
                          ArasA Offline
                          Aras
                          wrote on last edited by
                          #12

                          Well that wayland module cloned from the link I posted does not build on my system. It gave this error:

                          In file included from ../../include/QtWaylandClient/5.10.0/QtWaylandClient/private/qwaylandwindow_p.h:1:0,
                                           from qwaylandshmwindow_p.h:54,
                                           from qwaylandintegration.cpp:43:
                          ../../include/QtWaylandClient/5.10.0/QtWaylandClient/private/../../../../../src/client/qwaylandwindow_p.h:150:10: error: ‘void QtWaylandClient::QWaylandWindow::setWindowState(Qt::WindowStates)’ marked ‘override’, but does not override
                               void setWindowState(Qt::WindowStates state) override;
                                    ^~~~~~~~~~~~~~
                          qwaylandintegration.cpp: In constructor ‘QtWaylandClient::QWaylandIntegration::QWaylandIntegration()’:
                          qwaylandintegration.cpp:141:49: error: invalid new-expression of abstract class type ‘QtWaylandClient::QWaylandDrag’
                               mDrag.reset(new QWaylandDrag(mDisplay.data()));
                                                                           ^
                          In file included from qwaylandintegration.cpp:51:0:
                          qwaylanddnd_p.h:68:31: note:   because the following virtual functions are pure within ‘QtWaylandClient::QWaylandDrag’:
                           class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
                                                         ^~~~~~~~~~~~
                          In file included from qwaylanddnd_p.h:54:0,
                                           from qwaylandintegration.cpp:51:
                          /home/aras/Qt5.9.2/5.9.2/gcc_64/include/QtGui/5.9.2/QtGui/qpa/qplatformdrag.h:98:24: note: 	virtual QMimeData* QPlatformDrag::platformDropData()
                               virtual QMimeData *platformDropData() = 0;
                                                  ^~~~~~~~~~~~~~~~
                          Makefile:2911: recipe for target '.obj/qwaylandintegration.o' failed
                          make[2]: *** [.obj/qwaylandintegration.o] Error 1
                          make[2]: Leaving directory '/home/aras/Projects/qtwayland/src/client'
                          Makefile:73: recipe for target 'sub-client-make_first' failed
                          make[1]: *** [sub-client-make_first] Error 2
                          make[1]: Leaving directory '/home/aras/Projects/qtwayland/src'
                          Makefile:46: recipe for target 'sub-src-make_first' failed
                          make: *** [sub-src-make_first] Error 2
                          aras@aras-GL752VW:~/Projects/qtwayland$ git status 
                          On branch 5.10
                          Your branch is up-to-date with 'origin/5.10'.
                          
                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            You should rather build the module that you have in the Src folder or at least checkout the matching branch from your clone.

                            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
                            2
                            • ArasA Offline
                              ArasA Offline
                              Aras
                              wrote on last edited by
                              #14

                              @SGaist said in How do I install QtCompositor module?:

                              or at least checkout the matching branch from your clone.

                              Duh! Yes that was it. I just checked out 5.9.3 and build and installed. That worked like a charm. Thank you!

                              for the record, this is what I did:

                              git clone git://code.qt.io/qt/qtwayland.git
                              cd qtwayland
                              Projects/qtwayland$ git checkout origin/5.9.3
                              qmake
                              make 
                              make install
                              

                              And this time there was no error and I successfully ran, for the first time, a simple Wayland sample application. :)

                              1 Reply Last reply
                              1

                              • Login

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