[Development] Qt Platform Extras

Sorvig Morten Morten.Sorvig at digia.com
Mon Feb 25 09:35:37 CET 2013


Hi,

Getting ready for the 5.1 feature freeze, I think we should take some time unifying the structure and API of the platform extras modules.

There has already been some private discussion on this topic, and this is an attempt at reaching a final consensus. I think it's important that these modules are as similar as possible.

API:
    - Some classes and functions are named for Qt 4 compatbilty. These need to stay as is.
        * qt_mac_set_dock_menu(QMenu *)
    - Classes: QPlatformFoo ("QMacNativeWidget", "QX11Info")
    - Stand-alone function namespace:
        * Qt::toPlatformType (“Qt::toWindowsHBITMAP”. “Qt::toMacCGImageRef”)
	-OR-
        * QPlatform::toType(“QWindows::toHBITMAP”, "QMac::toCGImageRef")

Structure:
    - Filesystem structure:
        - src/
        - examples/
        - tests/
    - Public header naming:
        * Cross-platform header: qplatformfoo.h ("qmacunifiedtoolbar.h")
        * Platform-dependent header: qplatformfoo_platform.h ("qx11info_x11.h")
    * Build a .so/dll/dylib/framework: "QtMacExtras.framework", "QtX11Extras.so"
    * If Qt is built with widgets, then qplatformextras may depend on QtWidgets.

Morten






More information about the Development mailing list