Skip to content

Conversation

@expenses
Copy link
Contributor

No description provided.

@expenses
Copy link
Contributor Author

Currently getting this error:

thread 'main' (84556) panicked at internal/interpreter/dynamic_item_tree.rs:1103:25:
Native type not registered: StyledText

@ogoffart where should I be registering this?

out
}

pub fn parse_markdown(text: &str) -> std::string::String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that this function should return a slint::StyledText

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know

@ogoffart
Copy link
Member

Native type not registered: StyledText

This is supposed to be registered in

rtti_for::<MarkdownText>(),

@expenses
Copy link
Contributor Author

Native type not registered: StyledText

This is supposed to be registered in

rtti_for::<MarkdownText>(),

Ohh, right, thanks. Part of the confusion here is that we have both component StyledText and property <styled-text> and they both correspond to rust structs of the same name

@ogoffart
Copy link
Member

Part of the confusion here is that we have both component StyledText and property and they both correspond to rust structs of the same name

Indeed. It is possible to have the item have a different struct name. For example Window vs WindowItem
So you can rename the struct in rust to StyledTextItem and in builtins.slint have export StyledTextItem as StyledText

@expenses expenses marked this pull request as ready for review November 18, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants