Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Qt5 development primer

Qt5 development primer

Scheduled Pinned Locked Moved Wiki Discussion
166 Posts 72 Posters 201.1k 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.
  • K Offline
    K Offline
    kkoehne
    Moderators
    wrote on 7 Oct 2011, 09:52 last edited by
    #4

    Okay. The thing is that now Qt is modularized, every module moves at it's own speed, but there are of course dependencies. E.g. a recent change in qtbase might break qtdeclarative and so on ... There's no way we can ensure that all master branches at a time work with each other (also due to the CI system). Therefore the qt5.git repo contains a list of 'known' SHA's from every module that are known to work together. It's of course not bleeding edge, but a good baseline to start with.

    I'll do the changes now.

    Director R&D, The Qt Company

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on 7 Oct 2011, 09:56 last edited by
      #5

      Hi. Thanks for the explanation. I may be back with more questions after I read the updated article. ;-)

      Thank you for taking the time to do this. The hope is that it will lower the entry barrier for external contributors.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kkoehne
        Moderators
        wrote on 7 Oct 2011, 10:17 last edited by
        #6

        Okay, done. I was bold and removed some of the more obscure hacks that IMO aren't needed any more.

        Director R&D, The Qt Company

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on 7 Oct 2011, 10:19 last edited by
          #7

          Looks good. Many thanks once again.

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on 7 Oct 2011, 12:42 last edited by
            #8

            Thanks, looks like a very useful resource!

            1 Reply Last reply
            0
            • A Offline
              A Offline
              arichardson
              wrote on 8 Oct 2011, 13:54 last edited by
              #9

              I have a problem compiling modules other than qtbase even when following these instructions
              When running make I always get

              Project ERROR: Cannot load qmodule.pri!

              when trying to build qtsvg and qtxmlpatterns.

              Could the problem be that I am building in a different directory? Source is in ~/devel/qt5 and build dir is ~/devel/build/qt5

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZapB
                wrote on 8 Oct 2011, 17:14 last edited by
                #10

                Quite possibly caused by using a shadow build. Try an in-tree build as this is much better tested at present.

                Nokia Certified Qt Specialist
                Interested in hearing about Qt related work

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  arichardson
                  wrote on 8 Oct 2011, 19:18 last edited by
                  #11

                  I'm afraid I still get same issue with an in-tree build. Maybe I should try with a clean checkout.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    arichardson
                    wrote on 9 Oct 2011, 16:36 last edited by
                    #12

                    It seems to work now with a clean checkout, however I get following compilation error:

                    qsvgiconengine.cpp:47:26: fatal error: qsvgrenderer.h: File not found.
                    compilation terminated.

                    when compiling qtsvg.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kkoehne
                      Moderators
                      wrote on 10 Oct 2011, 07:05 last edited by
                      #13

                      Do you have a qsvgrenderer.h in qt5/qtsvg/include/QtSvG ? If not you can run "syncqt" in your qtsvg root directory.

                      Director R&D, The Qt Company

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        arichardson
                        wrote on 10 Oct 2011, 11:11 last edited by
                        #14

                        I did a new clean build and for some reason it worked now. Thank you for your help.

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jmfairlie
                          wrote on 13 Oct 2011, 08:25 last edited by
                          #15

                          On mac 10.6.8, I have problems building this. The linker complains about an nonexistent "OpenGl" library. After replacing with "OpenGL" (notice capital L) in the offending files* this issue resolves.
                          Unfortunately QtQuick2.0 examples don't work. For some reason importing folders from QML files is not working as it should. qmlscene doesnt recognize the imported folders (despite the fact that they are there at the same level as the invoking qml file). I keep getting:

                          .../somefile.qml: "SomeFolder": No such directory

                          (*) among them:
                          ./qtbase/src/platformsupport/cglconvenience/cglconvenience.pri: LIBS += -framework Cocoa -framework OpenGl

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kkoehne
                            Moderators
                            wrote on 13 Oct 2011, 08:39 last edited by
                            #16

                            @jmfairlie: I'm not working on Mac OS X, sorry. You should raise your problems (after verifying that the problem is still there in latest master branch of e.g. qtbase) on IRC/freenode, #qt-labs channel . Or you raise it on qt5-feedback@qt.nokia.com .

                            Director R&D, The Qt Company

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jmfairlie
                              wrote on 14 Oct 2011, 05:17 last edited by
                              #17

                              Now I tried with Ubuntu 11.04 with an ATI gpu (might be relevant) and linker isn't able to find GL libraries. Indeed, for some reason, there is no /usr/lib/libGL.so in my machine (not sure if this is normal) but only in /usr/lib/mesa and /usr/lib/fglrx.

                              If I add "-opengl desktop" to configure then it shows the message:

                              The OpenGL functionality test failed!
                              You might need to modify the include and library search paths by editing
                              QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
                              .../qt5/qtbase/mkspecs/linux-g++.

                              If I follow the suggestion and add those lines to qtbase/mkspecs/linux-g++/qmake.conf :

                              QMAKE_LIBDIR_OPENGL = /usr/lib/fglrx
                              QMAKE_INCDIR_OPENGL = /usr/include/GL
                              QMAKE_LIBS_OPENGL = -lGL

                              It doesn't make a difference and linker is still unable to find the GL libraries, (I guess those macros are not being used)

                              However if I just add a symlink to any of the GL libs to /usr/lib it finally finds them.

                              Unfortunately, QtQuick2.0 examples (what I'm interested in) don't work either, this time qmlscene SEGFAULTS in a seemingly unrelated call ... I guess I'll need to wait until a more stable version comes out.

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kkoehne
                                Moderators
                                wrote on 15 Oct 2011, 07:28 last edited by
                                #18

                                Ubuntu 11.04 is used heavily in the development teams, so this should really work out of the box, without any environment variable tinkering. The libgl1-mesa-dev should include the /usr/lib/libGL.so file, try installing this package. (Btw, you can find out which package provides which file by using the "apt-get file search" command).

                                For reference, this is the output "configure -nokia-developer -nomake examples -nomake demos -nomake tests" gives me on an Ubuntu 11.04:

                                @
                                Build type: linux-g++
                                Architecture: i386
                                Host architecture: i386
                                Platform notes:

                                        - Also available for Linux: linux-kcc linux-icc linux-cxx
                                

                                Build .................. libs
                                Configuration .......... debug shared dll qpa largefile stl precompile_header mmx 3dnow sse sse2 sse3 ssse3 sse4_1 sse4_2 avx minimal-config small-config medium-config large-config full-config fontconfig xlib xcb-xlib phonon-backend accessibility opengl qpa reduce_exports clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-mng system-png png system-tiff system-freetype system-zlib nis cups glib gstreamer dbus openssl xcb alsa pulseaudio concurrent audio-backend svg v8 debug private_tests
                                Debug .................. yes
                                Qt 3 compatibility ..... no
                                QtDBus module .......... yes (run-time)
                                QtConcurrent code ...... yes
                                QtGui module ........... yes
                                QtScript module ........ yes
                                QtScriptTools module ... yes
                                QtXmlPatterns module ... yes
                                Phonon module .......... yes
                                Multimedia module ...... auto
                                SVG module ............. yes
                                WebKit module .......... yes
                                JavaScriptCore JIT ..... To be decided by JavaScriptCore
                                V8 module .............. yes
                                Declarative module ..... yes
                                Declarative debugging ...yes
                                Location module ........ no
                                Support for S60 ........ no
                                Symbian DEF files ...... no
                                STL support ............ yes
                                PCH support ............ yes
                                MMX/3DNOW/SSE/SSE2/SSE3. yes/yes/yes/yes/yes
                                SSSE3/SSE4.1/SSE4.2..... yes/yes/yes
                                AVX..................... yes
                                IPv6 ifname support .... yes
                                getaddrinfo support .... yes
                                getifaddrs support ..... yes
                                Accessibility .......... yes
                                NIS support ............ yes
                                CUPS support ........... yes
                                Iconv support .......... no
                                Glib support ........... yes
                                GStreamer support ...... yes
                                PulseAudio support ..... yes
                                Large File support ..... yes
                                GIF support ............ plugin
                                TIFF support ........... plugin (system)
                                JPEG support ........... plugin (system)
                                PNG support ............ yes (system)
                                MNG support ............ plugin (system)
                                zlib support ........... system
                                Session management ..... auto
                                OpenGL support ......... yes (Desktop OpenGL)
                                OpenVG support ......... no
                                MySQL support .......... plugin
                                SQLite support ......... plugin (qt)
                                OpenSSL support ........ yes (run-time)
                                Alsa support ........... yes
                                ICD support ............ no
                                libICU support ......... no
                                Xcb support ............ limited (old version)
                                @

                                Director R&D, The Qt Company

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  jmfairlie
                                  wrote on 15 Oct 2011, 09:02 last edited by
                                  #19

                                  this is what I got, I'll check on Monday if getting rid of the differences makes any difference:
                                  @
                                  --- a/jean
                                  +++ b/kkoehne
                                  -QtDBus module .......... no
                                  +QtDBus module .......... yes (run-time)
                                  -Phonon module .......... no
                                  +Phonon module .......... yes
                                  -CUPS support ........... no
                                  +CUPS support ........... yes
                                  -GStreamer support ...... no
                                  -PulseAudio support ..... no
                                  +GStreamer support ...... yes
                                  +PulseAudio support ..... yes
                                  -MNG support ............ plugin (qt)
                                  +MNG support ............ plugin (system)
                                  +MySQL support .......... plugin
                                  -OpenSSL support ........ no
                                  -Alsa support ........... no
                                  +OpenSSL support ........ yes (run-time)
                                  +Alsa support ........... yes
                                  @

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    jmfairlie
                                    wrote on 20 Oct 2011, 16:00 last edited by
                                    #20

                                    pulled current latest version:

                                    commit 0a0d66efceb64bcacffbf733053834829c657df7
                                    Date: Wed Oct 19 07:38:37 2011 +1000

                                    and this time qmlscene spit some more info after segfault:

                                    "Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled"

                                    This message directed me to:
                                    http://comments.gmane.org/gmane.comp.lib.qt.qml/3060

                                    which suggests to install libx11-xcb-dev. Indeed I didn't have it, so I installed, cleaned and rebuilt, and now it works.

                                    If this package is required for qtdeclarative to work properly shouldn't configure notice it and mention it somehow?
                                    Anyhow, Just added this info to the wiki page.

                                    1 Reply Last reply
                                    0
                                    • Q Offline
                                      Q Offline
                                      qtd1d1
                                      wrote on 22 Nov 2011, 10:02 last edited by
                                      #21

                                      The installation was successful, but when I try to compile my own application I get the following error:
                                      QDeclarativeView: No such file or directory

                                      Just read the windows needs python for QDeclarative. What packages do I need for Linux (Ubuntu 10.04) ?

                                      Does anyone had similar problems?

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        andreagrandi
                                        wrote on 23 Nov 2011, 13:37 last edited by
                                        #22

                                        After compiling Qt5 I'd like to do a safe "make install" in my system. With "safe" I mean that I don't want to overwtite my Qt4 libs on my system so they should be installed in (for example) /opt/qt5 if it's possible.

                                        I also would like to start packaging Qt5 in a Ubuntu PPA, but even if I've a little experience with packaging, I really don't know how to split an installation in multiple packages (I mean: qt-multimedia, qt-database, qt-tools ecc.... just to make you an example): should I take example from the actual Qt4 packages available in Ubuntu? Anyone want to help me? Thanks!

                                        1 Reply Last reply
                                        0
                                        • Q Offline
                                          Q Offline
                                          qtd1d1
                                          wrote on 24 Nov 2011, 10:07 last edited by
                                          #23

                                          How do you force qtbase/src/plugins/platforms/xcb to recompile?

                                          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