December 21, 2011

daviddoria daviddoria
Lab Rat
62 posts

Examples repository

 

I have lots of examples of things I’ve learned to do in Qt:

http://programmingexamples.net/wiki/Qt

This format has been wildly successful for the ITK and VTK projects (http://www.vtk.org/Wiki/VTK/Examples/Cxx, http://www.itk.org/Wiki/ITK/Examples) – you can see there are tens of thousands of hits.

I was planning to move these Qt examples the Qt wiki. I did one here:

http://developer.qt.nokia.com/wiki/Progress-bar

However, before putting a huge amount of effort into moving these, I thought it would be easier for people to use/edit/add to them if they were in a repository. I was going to start a github repository and post links to it from the qt docs pages, but then it isn’t hosted in an “official” place, which seems bad. Any thoughts on the best thing to do here? It could be a combination of the two, where a wiki page contains the text and perhaps a screenshot, and the code lives in a repository and is pointed to with a link?

Please let me know what you think,

David

3 replies

December 21, 2011

miroslav miroslav
Lab Rat
228 posts

Sounds very useful, and should definitely move in with this forum and the Qt documentation.

 Signature 

Mirko Boehm | .(JavaScript must be enabled to view this email address) | KDE e.V.
FSFE Fellow
Qt Certified Specialist

December 21, 2011

Alexandra Alexandra
Hobby Entomologist
607 posts

I’m with Mirko here. I think documenting the examples makes sense in the wiki, if you’re not up for pushing this completely upstream. IMHO, it doesn’t really matter where the code is hosted in that case.

I do encourage you to consider contributing these examples to the official documentation though because they are very useful for a lot of people.

 Signature 

*THE CAKE IS A LIE*
Web Community Manager - Qt Development Frameworks

December 21, 2011

daviddoria daviddoria
Lab Rat
62 posts

I am happy to push them upstream. My first move was to add this progress bar example I had put on the wiki. I checked out Qt from gitorious and looked in examples/qtconcurrent/ and there was a progressdialog example that does exactly what mine did! In this case, I would have really loved a link to it from here:

http://developer.qt.nokia.com/doc/qt-4.8/qtconcurrent.html

and a few other places (http://developer.qt.nokia.com/doc/qt-4.8/qfuturewatcher.html for example).

I looked in qfuturewatcher.cpp and saw a ‘snippet’ command, but we should not include the full example inline with the documentation, but rather simply link to it. I would suggest something like an “Examples” section that would appear in the “Contents” menu on the documentation page. Any thoughts on a good way to do this? Also, most examples will have many more than one file. It would be ideal to be able to display them all one one page (like this: http://programmingexamples.net/wiki/Qt/ModelView/ListViewComboBox ).

Lets continue with this examples/qtconcurrent/progressdialog example as a test case. Once we develop a system, I’ll start working on submitting new examples.

 
  ‹‹ Automated linking to documentation      Linking documentation to source files ››

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