Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134515

[Windows] libpng warning: tRNS: invalid with alpha channel in minimal Qt application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7.3
    • Image formats
    • None
    • OS:Windows 11 x64
      Qt Version: 6.7.3
      Compiler: MinGW 11.2.0 64-bit
    • Windows

    Description

      When running a minimal Qt application (no explicit PNG resources or image loading), multiple libpng warnings appear in the console:
      libpng warning: tRNS: invalid with alpha channel
      **

      This occurs even after upgrading to Qt 6.7.3 and cleaning the build environment. The application exits normally (code 0), but the warnings suggest an internal Qt resource conflict.

      Steps to reproduce:
      1. Create a new Qt Widgets project with a blank QWidget.
      2. Build and run the project (MinGW 64-bit kit).
      3. Observe the console output for libpng warnings.

      Expected result:
      No libpng warnings should appear for a minimal project.

      Actual result:
      Multiple "tRNS: invalid with alpha channel" warnings are logged.

      Additional notes:

      • The project does NOT use any PNG resources (.qrc or code-based loading).
      • The warnings persist across clean rebuilds and different Qt versions (tested on 6.7.3).
      • Likely caused by internal Qt resources (e.g., style icons or themes).

       

      Attachments

        1. main.cpp
          0.2 kB
        2. Snipaste_2025-03-07_19-39-46.png
          Snipaste_2025-03-07_19-39-46.png
          20 kB
        3. test.pro
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            ywoiush Tianxing Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes