Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. RTTI problem with MSVC
Forum Updated to NodeBB v4.3 + New Features

RTTI problem with MSVC

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 61 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HJPE
    wrote on 2 May 2025, 07:52 last edited by
    #1

    I recently moved from Qt 5.15 to Qt 6.8.3. While building went smoothly, the software experienced crashes. I did some experiments and found that the crashes were related to RTTI support. When runtime type information was disabled (as it has been in my projects for years) the software would crash, when enabled, no crashes would occur. I use Visual Studio 2022 for development.
    I created a minimum example using the MDI sample within QtCreator. As this is what I want to do in the future, I display QML in the MDI child window via QQuickWidget.

    When using "Desktop Qt 6.8.3 MSVC2022 64bit", the software works as expected: creating an MDI child displays a QML file.
    When I add the following line to the .pro file:

    QMAKE_CXXFLAGS += /GR-
    

    and rebuild, the software crashes.

    When using "Desktop Qt 6.8.3 MinGW 64-bit", the software works as expected.
    When I add the following line to the .pro file:

    QMAKE_CXXFLAGS += -fno-rtti
    

    and rebuild, the software still works as expected.
    From this I conclude that there is a problem with RTTI and MSVC.

    Is my conclusion correct, and if yes, how can I solve the problem? I would like to avoid turning on RTTI support in all of my existing projects.
    I have my sample project ready for upload but do not know how to accomplish this.

    1 Reply Last reply
    0

    1/1

    2 May 2025, 07:52

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved