Skip to content

Compilation issue with Q_INIT_RESOURCE #1

Open

Description

@nsnavare

Hello,

I just downloaded the source code and tried to compile according to the instructions in your video tutorial.

An error occurs while compiling the project. Its something regarding Q_INIT_RESOURCE. In the macro defined in qglobal.h, it tries to paste the "livewindow" argument and I probably think that's where the issue lies. Also, I am not sure but can you please check whether it should be livewindow or livecodingpanel and the resource as LiveCodingPanel.qml? Please refer to the attached file for the screenshot.

Thanks a lot.

init_resource_error

Activity

  1. happydpc commented on Oct 21, 2019

    @happydpc

    You can try this.

    inline void initMyResource() { Q_INIT_RESOURCE(qml); }
    QString LiveWindow::loadLiveWindow()
    {
    // Q_INIT_RESOURCE(qml);
    initMyResource();
    return QStringLiteral("qrc:/com/machinekoder/live/LiveWindow.qml");
    }

  2. nsnavare commented on Oct 21, 2019

    @nsnavare
    Author
  3. grantrostig commented on Feb 22, 2024

    @grantrostig

    Does this work with>>>
    Qt Creator 12.0.1
    Based on Qt 6.6.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions