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



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



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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.