June 21, 2011

ZapB ZapB
Ant Farmer
1424 posts

Qt5 development primer

Page  
1

Hey All,

For anybody wanting to contribute to Qt5 I have started a wiki article [developer.qt.nokia.com] on how to go about getting the code for the modularised Qt5 and building it.

Please feel free to edit for other platforms or as things change during development.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

152 replies

October 7, 2011

kkoehne kkoehne
Ant Farmer
63 posts

Hi, I took the liberty to link to this thread from the wiki page :) I’d like to suggest a couple of changes, but on the other side do not want to start an edit war …

Don’t advocate the use of “./qtrepotools/bin/qt5_tool -p” . It’ll check out the master branches of every repo, which more likely than not break compilation . People who really want to live on the bleeding edge will find out how to achieve that … There should be no further steps necessary (no git remote rm gerrit, no special webkit/v8 handling). It’s IMO a high priority bug if that doesn’t succeed, so don’t advocate workarounds!

Along the same line, a way to update Qt5 repo isn’t qt5_tool -p, but git pull && git submodule update —recursive!

October 7, 2011

ZapB ZapB
Ant Farmer
1424 posts

Hi! Please feel free to edit the wiki article as to the latest recommendations. I put the basic instructions up a while ago now so I am not surprised if much has changed. The usage of qt5_tool -p came from a troll on #qt-labs at the time.

A quick question, if we should not use qt5_tool -p then why does it exist?

Others have added the gerrit-related stuff and other bits and pieces.

Could you add a brief not on how to live on the bleeding edge then please? This is supposed to be an article to help people do so so that they can contribute back under Open Governance.

Many thanks for any input you can give.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

October 7, 2011

kkoehne kkoehne
Ant Farmer
63 posts

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.

October 7, 2011

ZapB ZapB
Ant Farmer
1424 posts

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.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

October 7, 2011

kkoehne kkoehne
Ant Farmer
63 posts

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

October 7, 2011

ZapB ZapB
Ant Farmer
1424 posts

Looks good. Many thanks once again.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

October 7, 2011

Andre Andre
Robot Herder
6393 posts

Thanks, looks like a very useful resource!

October 8, 2011

arichardson arichardson
Lab Rat
4 posts

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

October 8, 2011

ZapB ZapB
Ant Farmer
1424 posts

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

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

October 8, 2011

arichardson arichardson
Lab Rat
4 posts

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

October 9, 2011

arichardson arichardson
Lab Rat
4 posts

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.

October 10, 2011

kkoehne kkoehne
Ant Farmer
63 posts

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

October 10, 2011

arichardson arichardson
Lab Rat
4 posts

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

October 13, 2011

jmfairlie jmfairlie
Lab Rat
4 posts

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

October 13, 2011

kkoehne kkoehne
Ant Farmer
63 posts

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

Page  
1

  ‹‹ [SOLVED] You are not allowed to edit this page.      How to create and use custom libraries on Windows ››

You must log in to post a reply. Not a member yet? Register here!