Linking documentation to source files
Is there a way to link to a source file (in the qt source tree) from the documentation? Or better yet, I want to display multiple source files on the same page, something like: http://programmingexamples.net/wiki/Qt/ModelView/ListViewComboBox
I am trying to link documentation to examples, but I don't think we should include the full example inline with the documentation (simply for length sake), but rather 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?
when you open qt creator in the first window go through the getting started tab there is combo that show the examples written in qt all the example in demo and documentation are there...
What I am trying to do is link to examples from the documentation - I want a page like this: http://developer.qt.nokia.com/doc/qt-4.8/qtimer.html to link to a few files in qt/examples.
You can add your links in the notes at the bottom of the page. It's one of their purposes.
Ok, that is where to add them (though I think they should be in the actual source file so that they are in the actual distribution, not separated and existing only on the website) - but I'm still not sure what to link to? I.e. if I want to link to qt/examples/graphicsview/anchorlayout/main.cpp - what do I make the actual link?
Ahhhhh! Sorry, I missed that. Would this work?
[Updated the link, I grabbed the wrong one initially...]
That is a good start... it will certainly work for a first pass.
Ideally I would like to display a few files on the same page, so the user can see everything "at a glace" without having to switch back and forth between pages - like this:
Any thoughts on how to do something like that?
And keep in mind you can link to exactly a single line of code...
I assume you want to avoid to copy a whole file. You could copy parts of it into the notes, but I believe linking would work just fine. Maybe along with some explanations as to what to look for in the example?