Skip to content

Commit

Permalink
Merge pull request #22 from timsueberkrueb/master
Browse files Browse the repository at this point in the history
Add API wrapper for QQuickStyle::setStyle
  • Loading branch information
ogoffart authored Jan 6, 2019
2 parents 5b6527c + 7cc7ac0 commit ab4b8c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qmetaobject/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,3 +777,5 @@ pub mod connections;
pub use connections::RustSignal;
use connections::{CppSignal, SignalCppRepresentation};
pub mod scenegraph;
pub mod qtquickcontrols2;
pub use qtquickcontrols2::*;
11 changes: 11 additions & 0 deletions qmetaobject/src/qtquickcontrols2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use qttypes::QString;

/// Refer to the Qt documentation for QQuickStyle
pub struct QQuickStyle {}

impl QQuickStyle {
/// Refer to the Qt documentation for QQuickStyle::setStyle
pub fn set_style(style: &str) {
std::env::set_var("QT_QUICK_CONTROLS_STYLE", style);
}
}

0 comments on commit ab4b8c1

Please sign in to comment.