QtCreator "error: xcb/xcb.h: No such file or directory" when building an application

When I use the nix-shell (with qmake, etc.) for building https://github.com/pbek/QOwnNotes, I’ve no issues using “qmake && make” in the terminal.

But when I use qtcreator in the nix-shell then qccreator complains about:

/nix/store/ph4hnl6f43jmfcvql72xwbqs7h852f59-qtx11extras-5.15.8-dev/include/QtX11Extras/qx11info_x11.h:46: error: xcb/xcb.h: No such file or directory
In file included from /nix/store/ph4hnl6f43jmfcvql72xwbqs7h852f59-qtx11extras-5.15.8-dev/include/QtX11Extras/QX11Info:1,
                 from ../src/libraries/qhotkey/QHotkey/qhotkey_x11.cpp:8:
/nix/store/ph4hnl6f43jmfcvql72xwbqs7h852f59-qtx11extras-5.15.8-dev/include/QtX11Extras/qx11info_x11.h:46:10: fatal error: xcb/xcb.h: No such file or directory
   46 | #include <xcb/xcb.h>
      |          ^~~~~~~~~~~

Any ideas why IDEs don’t seem to find the header file?

I already have all kind of stuff in my shell.nix for that project:

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    # nativeBuildInputs is usually what you want -- tools you need to run
    nativeBuildInputs = [
      pkgs.qt5.qtbase.dev
      pkgs.qt5.qmake
      pkgs.qt5.qtx11extras
      pkgs.qt5.qtwebsockets
      pkgs.qt5.qtdeclarative
      pkgs.qt5.qtsvg
      pkgs.xorg.libX11
      pkgs.xorg.libX11.dev
      pkgs.xorg.libxcb.dev
    ];
}

I needed to use the gcc-wrapper to solve this.
See Nix-shell, CMake, GCC, QT Creator not working together - #3 by Sandro