João Silva
João Silva

Reputation: 413

Comments on .pro file Qt Creator

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.

Upvotes: 11

Views: 10284

Answers (4)

StndFish
StndFish

Reputation: 137

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.

Upvotes: 2

Gav_at_HRSTS
Gav_at_HRSTS

Reputation: 189

If using QtCreator, highlight the section you wish to comment out, then right click for context menu and select 'Toggle Comment Selection'. This is good for large blocks code to comment out.

Upvotes: 0

shofee
shofee

Reputation: 2129

You can comment lines by using a # symbol.

In the .pro file, # before any line or statement indicates a comment.

Upvotes: 16

andrea.marangoni
andrea.marangoni

Reputation: 1499

you have to place a # at the begin of each line.

Upvotes: 4

Related Questions