Skip to content

How to use Image correctly #135

@Grewer

Description

@Grewer

If reference the image in react

import testPng from './static/text.png'

<Image src={testPng}/>

console:

QPixmap::scaled: Pixmap is a null pixmap

Okay it doesn't work

If I use resolve to reference the image

const imageUrl = `${path.resolve(__dirname, `./static/text.png`)}`;

<Image src={imageUrl}/>

When I was debugging it was successful

But when I pack:

webpack -p && nodegui-packer --pack ./dist

the image has not been webpacked and is not packed into dist

Image doesn't show up after I open the app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions