Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Showcase
  4. ClassBuilder 3.0 — a 25-year-old MFC code generator, now all-Qt on Windows, macOS and Linux
Qt 6.11 is out! See what's new in the release blog

ClassBuilder 3.0 — a 25-year-old MFC code generator, now all-Qt on Windows, macOS and Linux

Scheduled Pinned Locked Moved Unsolved Showcase
1 Posts 1 Posters 35 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.
  • J Offline
    J Offline
    jvenema
    wrote last edited by
    #1

    ClassBuilder is a C++ code-generation tool: you define an object model in the GUI — classes, members, methods, relations, inheritance, class and sequence diagrams — and it writes the .h/.cpp. It is self-hosted; the model that generates its own source ships in the repo.

    It was a Windows-only MFC application from 2002 until this year. The port to Qt 6 is now complete: MFC is entirely gone, and one source tree builds on all three platforms, with #ifdef _WIN32 / #else branches confined to a single platform seam (CbPlatformCompat).

    Notes that may be useful to others porting something similar:

    Qt 6 forces UNICODE/_UNICODE on anything linking it, while the model is a MultiByte build calling the ANSI Win32 API. Solved by quarantining the Qt code in a static lib that links Qt PRIVATE, and re-stripping the defines on the executable with /UUNICODE /U_UNICODE.
    The Win32 named-pipe command server became a QTcpServer on loopback — same JSON protocol on all three platforms.
    Two dock bugs in 6.11.1 needed upstream backports (QTBUG-147209 and the group-dissolution crash); patches and write-ups are in the repo under crossplatform/qt-patches/.
    GroupedDragging is disabled on all platforms: forming a floating tab group could still be driven into a QMainWindowLayout::animationFinished use-after-free even with both patches applied.
    Static Qt on all three, so it ships as a single self-contained binary. Installers for Windows, macOS and Linux: https://github.com/xaljox/ClassBuilder

    1 Reply Last reply
    0

    • Login

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