-
Notifications
You must be signed in to change notification settings - Fork 77
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
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....
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
dae15d9
to
48a9cd3
Compare
// TODO: we should really pass a parent in here | ||
let mut push_button = QPushButton::new(); |
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.
Should we use UniquePtr or should we use raw pointer and set a parent like Qt, or should we support both?
48a9cd3
to
db51492
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 71 71
Lines 11953 11953
=========================================
Hits 11953 11953 ☔ View full report in Codecov by Sentry. |
Lots of hacks, but we can launch a
QPushButton
!I'll likely pick things off from this branch as separate pull requests over time.