Comments (9)
hmm, in this case, you can try using css for top-level component
style={'background-image: url(/path/to/image.png)'}
with some more props to handle background size, you can check reference for all supported props:
https://doc.qt.io/qt-5/stylesheet-reference.html
from react-nodegui.
you can use icon property on button component
is it enough to do the trick?
from react-nodegui.
you can use icon property on button component
is it enough to do the trick?
Thanks for the reply.
Button doesn't fit my needs.
I wanna a big image as background of my app. The image should fit all of the window.
from react-nodegui.
It works.
Thanks a lot!
from react-nodegui.
background-image
works in nodegui
but take no effect in react-nodegui
I tested in react-nodegui-starter by:
inline style like:
style={'background-image: url(/Users/leo/Pictures/20150922224629_25mVM.jpeg)'}
style sheet like:
const styleSheet=`
background-image: url(/Users/leo/Pictures/20150922224629_25mVM.jpeg);
`
All above methods did not work.
from react-nodegui.
Hi @leopku
import { Window, hot, View, Button } from "@nodegui/react-nodegui";
import React from "react";
import { QIcon } from "@nodegui/nodegui";
import nodeguiIcon from "../assets/nodegui.jpg";
const minSize = { width: 500, height: 520 };
const winIcon = new QIcon(nodeguiIcon);
class App extends React.Component {
render() {
return (
<Window windowIcon={winIcon} windowTitle="Hello 👋🏽" minSize={minSize}>
<View style={containerStyle}>
<Button style={"background-color: blue;"} text="Hello"></Button>
</View>
</Window>
);
}
}
const containerStyle = `
flex: 1;
background-image: url(/Users/atulr/Project/nodegui/react-nodegui-starter/assets/nodegui.jpg)
`;
export default hot(App);
This is the code I am using
and this is the output i get:
from react-nodegui.
Can you post the link to a repo where I can see the issue ? @leopku
from react-nodegui.
Magic.
After fixing nodegui/react-nodegui-starter#89, It works now.
Thank you @master-atul and @Solant .
from react-nodegui.
It not changed after changing url(...) to a new background.
See #150, plz.
from react-nodegui.
Related Issues (20)
- Bad URL Protocol C: when running on Windows.
- react nodegui call stack exceeded error when using GridView/ BoxView components HOT 5
- What should I use to manipulate audio in react nodegui? HOT 1
- Running for the second time no Macbook M1 HOT 3
- [Question] How do I use an SVG as an app background?
- It seems that react third-party component libraries are not supported HOT 1
- RNList and FlexLayout
- process dlopen: Cannot find symbol in flat namespace
- Can I create Intel windows binary on Apple Arm M1 machine ?
- libQt5Core.so.5: version `Qt_5.15' not found
- Cannot receive close event of FileDialog HOT 2
- Can I create submenus for System Tray Menu Actions?
- Is List component same as FlatList (efficient renderer)?
- Frameless window
- qmenubar.setCornerWidget
- Getting selected text in PlainTextEdit
- QTableWidget support
- This project is unmaintained
- Add windowGeometryChanged to QMainWindowSignals to track window changes. HOT 1
- was this project die?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-nodegui.