-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples: add basic widgets example #622
base: main
Are you sure you want to change the base?
Conversation
d33623c
to
27851e2
Compare
27851e2
to
81a04e6
Compare
81a04e6
to
461bfaf
Compare
type QString = cxx_qt_lib::QString; | ||
|
||
#[qsignal] | ||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we only connect to the signal and don't emit it causes dead code, wonder if we should always mark as dead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(as this is an existing signal rather than one being created from Rust, so for inherit / C++Qt types you might not see an emit)
461bfaf
to
8574b42
Compare
8574b42
to
525e1df
Compare
525e1df
to
58abe41
Compare
use cxx_qt_lib::QString; | ||
use cxx_qt_lib_extras::{QApplication, QPushButton}; | ||
|
||
fn main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have some kind of test as well, even if C++ to see if this works, unsure how so far....
bcb4e07
to
b9dcbfc
Compare
b9dcbfc
to
dae15d9
Compare
#[qobject] | ||
type QPushButton; | ||
|
||
// TODO: we should use upcasting methods here and implement QAbstractButton and QWidget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should figure out how upcasting is going to work, as otherwise we are going to duplicate a load of methods in the widgets world
Lots of hacks, but we can launch a
QPushButton
!I'll likely pick things off from this branch as separate pull requests over time.