diff --git a/programs/light_client/ClientDataModel.cpp b/programs/light_client/ClientDataModel.cpp index 3c48fee4..f76267d2 100644 --- a/programs/light_client/ClientDataModel.cpp +++ b/programs/light_client/ClientDataModel.cpp @@ -17,6 +17,7 @@ Account* ChainDataModel::getAccount(ObjectId id) if( itr == by_id_idx.end() ) { auto tmp = new Account; + QQmlEngine::setObjectOwnership(tmp, QQmlEngine::CppOwnership); tmp->id = id; --m_account_query_num; tmp->name = QString::number( --m_account_query_num); auto result = m_accounts.insert( tmp ); @@ -67,6 +68,7 @@ Account* ChainDataModel::getAccount(QString name) if( itr == by_name_idx.end() ) { auto tmp = new Account; + QQmlEngine::setObjectOwnership(tmp, QQmlEngine::CppOwnership); tmp->id = --m_account_query_num; tmp->name = name; auto result = m_accounts.insert( tmp ); diff --git a/programs/light_client/qml/AccountPicker.qml b/programs/light_client/qml/AccountPicker.qml index b148f64f..d94549ad 100644 --- a/programs/light_client/qml/AccountPicker.qml +++ b/programs/light_client/qml/AccountPicker.qml @@ -49,6 +49,24 @@ RowLayout { : account.id) }) } + + Behavior on text { + SequentialAnimation { + PropertyAnimation { + target: accountDetails + property: "opacity" + from: 1; to: 0 + duration: 100 + } + PropertyAction { target: accountDetails; property: "text" } + PropertyAnimation { + target: accountDetails + property: "opacity" + from: 0; to: 1 + duration: 100 + } + } + } } } }