Is there anyway to comment certain sections of my .pro
file (Qt project)?
In my case I want to comment specific parts that do not apply to the platform I'm currently targeting.
Found this now: http://doc.qt.io/qt-4.8/qmake-project-files.html.
You can select multiple lines in the editor and then right click.. There is an (Un)Comment selection and the shortcut is Ctrl+/ either for commenting or for uncommenting a line.
The purpose of a . pro file is to list the source files that are involved in a project. Since qmake is used for building Qt and its associated tools, it knows Qt very well and can generate rules for invoking moc, uic, and rcc.
In the Qt Creator application, choose menu File->Open File or Project, navigate to the project folder and choose the . pro file to open.
You can comment lines by using a #
symbol.
In the .pro
file, # before any line or statement indicates a comment.
I think Silva is looking for something like this in .pro file:
if(false) {
...
your block
...
}
This is the programmatic way to do commenting, and you have control of it. Similar approaches may available for other test functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With