I have lots of examples of things I’ve learned to do in Qt:
I was planning to move these Qt examples the Qt wiki. I did one here:
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,
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:
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.