qtbridge-runtime 0.1.3

Qt Bridge: bridging code to be run in applications.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only

use qtbridge_type_lib::{QMetaType, QVariant};

#[doc(hidden)]
pub fn get_meta_type_of_fn_return_value<F, This, R>(_f: F) -> QMetaType
where
    F: FnOnce(&This) -> &R,
    R: Default,
    QVariant: From<R>
{
    QVariant::from(<R as Default>::default()).meta_type()
}