Last active
November 9, 2022 12:08
-
-
Save tyhdefu/e2503d0194b06223d9fdfc5d6191b187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0277]: the trait bound `gtk4::ListBox: IsSubclassable<job_list::imp::JobList>` is not satisfied | |
--> src\job_list\imp.rs:11:23 | |
| | |
11 | type ParentType = gtk::ListBox; | |
| ^^^^^^^^^^^^ the trait `IsSubclassable<job_list::imp::JobList>` is not implemented for `gtk4::ListBox` | |
| | |
= help: the following other types implement trait `IsSubclassable<T>`: | |
Adjustment | |
ApplicationWindow | |
CellArea | |
CellAreaContext | |
CellRenderer | |
CellRendererText | |
CheckButton | |
ContentProvider | |
and 41 others | |
note: required by a bound in `gtk4::subclass::prelude::ObjectSubclass::ParentType` | |
--> C:\Users\james\.cargo\registry\src\github.com-1ecc6299db9ec823\glib-0.16.2\src\subclass\types.rs:553:22 | |
| | |
553 | type ParentType: IsSubclassable<Self> | |
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `gtk4::subclass::prelude::ObjectSubclass::ParentType` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use gtk::glib; | |
use gtk::subclass::prelude::*; | |
#[derive(Default)] | |
pub struct JobList; | |
#[glib::object_subclass] | |
impl ObjectSubclass for JobList { | |
const NAME: &'static str = "RnotifydMainPaned"; | |
type Type = super::JobList; | |
type ParentType = gtk::ListBox; | |
} | |
// Trait shared by all GObjects | |
impl ObjectImpl for JobList {} | |
// Trait shared by all widgets | |
impl WidgetImpl for JobList {} | |
// Trait shared by all buttons | |
impl ButtonImpl for JobList {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod imp; | |
use glib::Object; | |
use gtk::glib; | |
glib::wrapper! { | |
pub struct JobList(ObjectSubclass<imp::JobList>) | |
@extends gtk::ListBox, gtk::Widget, | |
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment