# Issue compiling geant4 on macos with qt enabled

**URL:** <https://geant4-forum.web.cern.ch/t/issue-compiling-geant4-on-macos-with-qt-enabled/15247>\
**Category:** Getting Started\
**Created:** [July 6, 2026, 12:55pm UTC](https://geant4-forum.web.cern.ch/t/issue-compiling-geant4-on-macos-with-qt-enabled/15247 "2026-07-06T12:55:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephanie\_P\_Flynn](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/9fc29f/32.png) [@Stephanie\_P\_Flynn](https://geant4-forum.web.cern.ch/u/Stephanie_P_Flynn)\
**Post date:** [July 6, 2026, 12:55pm UTC](https://geant4-forum.web.cern.ch/t/issue-compiling-geant4-on-macos-with-qt-enabled/15247/1 "2026-07-06T12:55:59Z")

</div>

_Geant4 Version:_ 11.4.2  
_Operating System:_ macOS Sequoia 15.7.7  
_Compiler/Version:_ Apple clang version 17.0.0 (clang-1700.6.4.2)  
_CMake Version:_ 4.3.4

I’m trying to compile geant4 on an M4 mac and it fails when qt is enabled, using qt 6.11.1. I get this error message:

```bash
In file included from /Users/sflynn/geant4/geant4-v11.4.2/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc:36:
In file included from /Users/sflynn/geant4/geant4-v11.4.2/source/visualization/OpenGL/include/private/G4OpenGLImmediateQtViewer.hh:36:
In file included from /Users/sflynn/geant4/geant4-v11.4.2/source/visualization/OpenGL/include/private/G4OpenGLQtViewer.hh:43:
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:429:23: error: no member named 'qobject_cast_helper' in namespace 'QtPrivate'
  429 | return QtPrivate::qobject_cast_helper<T>(object);
      | ~~~~~~~~~~~ ^
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:429:43: error: 'T' does not refer to a value
  429 | return QtPrivate::qobject_cast_helper<T>(object);
      | ^
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:426:17: note: declared here
  426 | template <class T>
      | ^
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:437:23: error: no member named 'qobject_cast_helper' in namespace 'QtPrivate'
  437 | return QtPrivate::qobject_cast_helper<T>(object);
      | ~~~~~~~~~~~ ^
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:437:43: error: 'T' does not refer to a value
  437 | return QtPrivate::qobject_cast_helper<T>(object);
      | ^
/opt/homebrew/lib/QtCore.framework/Headers/qobject.h:432:17: note: declared here
  432 | template <class T>
      | ^

```

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [July 6, 2026, 8:18pm UTC](https://geant4-forum.web.cern.ch/t/issue-compiling-geant4-on-macos-with-qt-enabled/15247/2 "2026-07-06T20:18:40Z")

</div>

Hi Stephanie

I too am using Qt 6.11.1 on Mac…but Mac OS Tahoe 26.5.1. I recall that home-brew changed something. I’m not an expert here, but it was something to do with how they supported both Qt6 and Qt5. Geant4 v11.4 should build with Qt6 by default. What I’m saying is, Qt 6.11.1 (which is the latest Qt) might not work with Sequoia 15.7.7.

I can only suggest updating your Mac. Sorry not to be more helpful.

John

---

<div class="post-metadata">

**Author:** ![system](https://geant4-forum.web.cern.ch/uploads/default/original/1X/ce519a43ebdf7ac48a98a03c6ad6eea013b68c46.png) [@system](https://geant4-forum.web.cern.ch/u/system)\
**Post date:** [August 5, 2026, 8:19pm UTC](https://geant4-forum.web.cern.ch/t/issue-compiling-geant4-on-macos-with-qt-enabled/15247/3 "2026-08-05T20:19:37Z")

</div>

Closed on August 5, 2026, 8:19pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
