<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.10.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>260</ContextCount>
  <ElementCount>354</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>94</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001501 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002000 - Statement - Condensed Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfOperations</Role>
      <ShortName>Condensed Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Condensed Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1003501 - Statement - Condensed Consolidated Statements of Comprehensive Income (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfComprehensiveIncomeParenthetical</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1004000 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Business and Organization</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/BusinessAndOrganization</Role>
      <ShortName>Business and Organization</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2103100 - Disclosure - New Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/NewAccountingPronouncements</Role>
      <ShortName>New Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Per Share Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformation</Role>
      <ShortName>Per Share Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Debt Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligations</Role>
      <ShortName>Debt Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/Equity</Role>
      <ShortName>Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Equity-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensation</Role>
      <ShortName>Equity-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Supplemental Cash Flow Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformation</Role>
      <ShortName>Supplemental Cash Flow Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2202201 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2302302 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2304301 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/Acquisitions</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssets</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Per Share Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationTables</Role>
      <ShortName>Per Share Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/PerShareInformation</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2307301 - Disclosure - Debt Obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsTables</Role>
      <ShortName>Debt Obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/DebtObligations</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2309301 - Disclosure - Equity-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationTables</Role>
      <ShortName>Equity-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/EquityBasedCompensation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/CommitmentsAndContingencies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SegmentInformation</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2312301 - Disclosure - Supplemental Cash Flow Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationTables</Role>
      <ShortName>Supplemental Cash Flow Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SupplementalCashFlowInformation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2401401 - Disclosure - Business and Organization (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/BusinessAndOrganizationDetail</Role>
      <ShortName>Business and Organization (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/BusinessAndOrganization</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2402403 - Disclosure - Summary of Significant Accounting Policies - Cash and Cash Equivalents (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesCashAndCashEquivalentsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Cash and Cash Equivalents (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2402404 - Disclosure - Summary of Significant Accounting Policies - Current and Long-Term Accounts and Notes Receivable and Allowance for Doubtful Accounts (Detail)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesCurrentAndLongTermAccountsAndNotesReceivableAndAllowanceForDoubtfulAccountsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Current and Long-Term Accounts and Notes Receivable and Allowance for Doubtful Accounts (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2402405 - Disclosure - Summary of Significant Accounting Policies - Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesGoodwillDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2402406 - Disclosure - Summary of Significant Accounting Policies - Other Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesOtherIntangibleAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Other Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2402407 - Disclosure - Summary of Significant Accounting Policies - Investments in Affiliates and Other Entities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesInvestmentsInAffiliatesAndOtherEntitiesDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Investments in Affiliates and Other Entities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2402408 - Disclosure - Summary of Significant Accounting Policies - Revenue Recognition (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesRevenueRecognitionDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Revenue Recognition (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2402409 - Disclosure - Summary of Significant Accounting Policies - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesDisaggregationOfRevenueDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2402410 - Disclosure - Summary of Significant Accounting Policies - Contract with Customer, Asset and Liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesContractWithCustomerAssetAndLiabilityDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Contract with Customer, Asset and Liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2402411 - Disclosure - Summary of Significant Accounting Policies - Income Taxes (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesIncomeTaxesDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Income Taxes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2402412 - Disclosure - Summary of Significant Accounting Policies - Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesEarningsPerShareDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2402413 - Disclosure - Summary of Significant Accounting Policies - Insurance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesInsuranceDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Insurance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2402414 - Disclosure - Summary of Significant Accounting Policies - Stock-Based Compensation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesStockBasedCompensationDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Stock-Based Compensation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2402415 - Disclosure - Summary of Significant Accounting Policies - Fair Value Measurements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SummaryOfSignificantAccountingPoliciesFairValueMeasurementsDetail</Role>
      <ShortName>Summary of Significant Accounting Policies - Fair Value Measurements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2403401 - Disclosure - New Accounting Pronouncements (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/NewAccountingPronouncementsDetail</Role>
      <ShortName>New Accounting Pronouncements (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/NewAccountingPronouncements</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2404402 - Disclosure - Acquisitions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsDetail</Role>
      <ShortName>Acquisitions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/AcquisitionsTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2404403 - Disclosure - Acquisitions - Business Acquisition Purchase Price Allocation Assets Acquired and Liabilities Assumed (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsBusinessAcquisitionPurchasePriceAllocationAssetsAcquiredAndLiabilitiesAssumedDetail</Role>
      <ShortName>Acquisitions - Business Acquisition Purchase Price Allocation Assets Acquired and Liabilities Assumed (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2404404 - Disclosure - Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsEstimatedFairValuesOfIdentifiableIntangibleAssetsAndRelatedWeightedAverageAmortizationDetail</Role>
      <ShortName>Acquisitions - Estimated Fair Values of Identifiable Intangible Assets and Related Weighted Average Amortization (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2404405 - Disclosure - Acquisitions - Unaudited Supplemental Pro Forma Results of Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/AcquisitionsUnauditedSupplementalProFormaResultsOfOperationsDetail</Role>
      <ShortName>Acquisitions - Unaudited Supplemental Pro Forma Results of Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Goodwill and Other Intangible Assets - Summary of Changes in Quanta's Goodwill (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsSummaryOfChangesInQuantasGoodwillDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Summary of Changes in Quanta's Goodwill (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Goodwill and Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2405404 - Disclosure - Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsOtherIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Other Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2405405 - Disclosure - Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/GoodwillAndOtherIntangibleAssetsEstimatedFutureAggregateAmortizationExpenseOfIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Other Intangible Assets - Estimated Future Aggregate Amortization Expense of Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Per Share Information - Basic and Diluted Earnings Per Share Attributable to Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationBasicAndDilutedEarningsPerShareAttributableToCommonStockDetail</Role>
      <ShortName>Per Share Information - Basic and Diluted Earnings Per Share Attributable to Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Per Share Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/PerShareInformationNarrativeDetails</Role>
      <ShortName>Per Share Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2407402 - Disclosure - Debt Obligations - Long-term Debt Obligations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsLongTermDebtObligationsDetail</Role>
      <ShortName>Debt Obligations - Long-term Debt Obligations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2407403 - Disclosure - Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Debt (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCurrentMaturitiesOfLongTermDebtAndShortTermDebtDetail</Role>
      <ShortName>Debt Obligations - Current Maturities of Long-Term Debt and Short-Term Debt (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2407404 - Disclosure - Debt Obligations - Credit Facility Amended and Restated Credit Agreement (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCreditFacilityAmendedAndRestatedCreditAgreementDetail</Role>
      <ShortName>Debt Obligations - Credit Facility Amended and Restated Credit Agreement (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2407405 - Disclosure - Debt Obligations - Credit Facility Current Borrowings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCreditFacilityCurrentBorrowingsDetail</Role>
      <ShortName>Debt Obligations - Credit Facility Current Borrowings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2407406 - Disclosure - Debt Obligations - Information on Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsInformationOnBorrowingsUnderCurrentAndPriorCreditFacilityAndApplicableInterestRatesDetail</Role>
      <ShortName>Debt Obligations - Information on Borrowings under Current and Prior Credit Facility and Applicable Interest Rates (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2407407 - Disclosure - Debt Obligations - Credit Facility Terms under the Amended and Restated Credit Agreement (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsCreditFacilityTermsUnderAmendedAndRestatedCreditAgreementDetail</Role>
      <ShortName>Debt Obligations - Credit Facility Terms under the Amended and Restated Credit Agreement (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2407408 - Disclosure - Debt Obligations - Other Facilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/DebtObligationsOtherFacilitiesDetails</Role>
      <ShortName>Debt Obligations - Other Facilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2408401 - Disclosure - Equity - Exchangeable Shares and Series F and Series G Preferred Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityExchangeableSharesAndSeriesFAndSeriesGPreferredStockDetail</Role>
      <ShortName>Equity - Exchangeable Shares and Series F and Series G Preferred Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2408402 - Disclosure - Equity - Treasury Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityTreasuryStockDetail</Role>
      <ShortName>Equity - Treasury Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2408403 - Disclosure - Equity - Non-controlling Interests (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityNonControllingInterestsDetail</Role>
      <ShortName>Equity - Non-controlling Interests (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2409402 - Disclosure - Equity-Based Compensation - Stock Incentive Plans (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationStockIncentivePlansDetail</Role>
      <ShortName>Equity-Based Compensation - Stock Incentive Plans (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2409403 - Disclosure - Equity-Based Compensation - RSUs to be Settled in Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationRsusToBeSettledInCommonStockDetail</Role>
      <ShortName>Equity-Based Compensation - RSUs to be Settled in Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2409404 - Disclosure - Equity-Based Compensation - Performance Units to be Settled in Common Stock (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationPerformanceUnitsToBeSettledInCommonStockDetail</Role>
      <ShortName>Equity-Based Compensation - Performance Units to be Settled in Common Stock (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2409405 - Disclosure - Equity-Based Compensation - Grant Date Fair Value for Awards of Performance Units Inputs (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationGrantDateFairValueForAwardsOfPerformanceUnitsInputsDetail</Role>
      <ShortName>Equity-Based Compensation - Grant Date Fair Value for Awards of Performance Units Inputs (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>2409406 - Disclosure - Equity-Based Compensation - RSUs to be Settled in Cash (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/EquityBasedCompensationRsusToBeSettledInCashDetail</Role>
      <ShortName>Equity-Based Compensation - RSUs to be Settled in Cash (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Commitments and Contingencies - Investments in Affiliates and Other Entities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesInvestmentsInAffiliatesAndOtherEntitiesDetail</Role>
      <ShortName>Commitments and Contingencies - Investments in Affiliates and Other Entities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>2410403 - Disclosure - Commitments and Contingencies - Minimum Lease Payments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesMinimumLeasePaymentsDetail</Role>
      <ShortName>Commitments and Contingencies - Minimum Lease Payments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>2410404 - Disclosure - Commitments and Contingencies - Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLeasesDetail</Role>
      <ShortName>Commitments and Contingencies - Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>2410405 - Disclosure - Commitments and Contingencies - Contingent Consideration (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesContingentConsiderationDetail</Role>
      <ShortName>Commitments and Contingencies - Contingent Consideration (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>2410406 - Disclosure - Commitments and Contingencies - Committed Expenditures (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesCommittedExpendituresDetail</Role>
      <ShortName>Commitments and Contingencies - Committed Expenditures (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>2410407 - Disclosure - Commitments and Contingencies - Legal Proceedings (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLegalProceedingsDetail</Role>
      <ShortName>Commitments and Contingencies - Legal Proceedings (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>2410408 - Disclosure - Commitments and Contingencies - Concentrations of Credit Risk (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesConcentrationsOfCreditRiskDetail</Role>
      <ShortName>Commitments and Contingencies - Concentrations of Credit Risk (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>2410409 - Disclosure - Commitments and Contingencies - Insurance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesInsuranceDetail</Role>
      <ShortName>Commitments and Contingencies - Insurance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>2410410 - Disclosure - Commitments and Contingencies - Letters of Credit (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesLettersOfCreditDetail</Role>
      <ShortName>Commitments and Contingencies - Letters of Credit (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>2410411 - Disclosure - Commitments and Contingencies - Performance Bonds and Parent Guarantees (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesPerformanceBondsAndParentGuaranteesDetail</Role>
      <ShortName>Commitments and Contingencies - Performance Bonds and Parent Guarantees (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>2410413 - Disclosure - Commitments and Contingencies - Indemnities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/CommitmentsAndContingenciesIndemnitiesDetail</Role>
      <ShortName>Commitments and Contingencies - Indemnities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Segment Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationDetail</Role>
      <ShortName>Segment Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SegmentInformationTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>2411403 - Disclosure - Segment Information - Summarized Financial Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SegmentInformationSummarizedFinancialInformationDetail</Role>
      <ShortName>Segment Information - Summarized Financial Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>2412402 - Disclosure - Supplemental Cash Flow Information - Schedule of Effect of Changes in Operating Assets and Liabilities, Net Of Non-Cash Transactions, On Cash Flows From Operating Activities of Continuing Operations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationScheduleOfEffectOfChangesInOperatingAssetsAndLiabilitiesNetOfNonCashTransactionsOnCashFlowsFromOperatingActivitiesOfContinuingOperationsDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Schedule of Effect of Changes in Operating Assets and Liabilities, Net Of Non-Cash Transactions, On Cash Flows From Operating Activities of Continuing Operations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>2412403 - Disclosure - Supplemental Cash Flow Information - Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationReconciliationOfCashCashEquivalentsAndRestrictedCashDetails</Role>
      <ShortName>Supplemental Cash Flow Information - Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>2412404 - Disclosure - Supplemental Cash Flow Information - Schedule of Additional Supplemental Cash Flow Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationScheduleOfAdditionalSupplementalCashFlowInformationDetail</Role>
      <ShortName>Supplemental Cash Flow Information - Schedule of Additional Supplemental Cash Flow Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>2412405 - Disclosure - Supplemental Cash Flow Information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SupplementalCashFlowInformationNarrativeDetails</Role>
      <ShortName>Supplemental Cash Flow Information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="pwr-20180630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>2413401 - Disclosure - Subsequent Event (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://quantaservices.com/role/SubsequentEventDetail</Role>
      <ShortName>Subsequent Event (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://quantaservices.com/role/SubsequentEvent</ParentRole>
      <Position>88</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>pwr-20180630.xml</File>
    <File>pwr-20180630.xsd</File>
    <File>pwr-20180630_cal.xml</File>
    <File>pwr-20180630_def.xml</File>
    <File>pwr-20180630_lab.xml</File>
    <File>pwr-20180630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/us-gaap/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/currency/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2014-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
