Skip to main content

backend_kdialog/
backend-kdialog.rs

1// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
2// SPDX-License-Identifier: MIT
3
4use dialog::backends;
5use dialog::DialogBox;
6
7fn main() -> dialog::Result<()> {
8    let mut backend = backends::KDialog::new();
9
10    dialog::Message::new("This is a message.")
11        .title("And this is a title:")
12        .show_with(&backend)?;
13
14    backend.set_icon("error");
15    dialog::Message::new("This is an error message.")
16        .title("Error")
17        .show_with(&backend)
18}