Skip to content
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

Unable to use Fluid in QtCreator on Linux #256

Open
daljit97 opened this issue May 30, 2018 · 8 comments
Open

Unable to use Fluid in QtCreator on Linux #256

daljit97 opened this issue May 30, 2018 · 8 comments
Labels

Comments

@daljit97
Copy link

daljit97 commented May 30, 2018

I cannot seem to make Fluid work inside my project. I have cloned Fluid inside my project folder, then I used INCLUDEPATH and QML2_IMPORT_PATH to include the necessary folders. I also tried with qputenv("QML2_IMPORT_PATH", "fluid/qml"), but nothing works (I always get Fluid.Controls is not installed). I am on Linux. I have checked the previous issues on this topic but none of them seems to work.

@obeezzy
Copy link

obeezzy commented May 31, 2018

@daljit97 , have you tried "make install"?

@daljit97
Copy link
Author

daljit97 commented May 31, 2018

Ok so I did that and then I added all the fluid/qml files into the qrc of my app. But now I get the following error:

QQmlApplicationEngine failed to load component
qrc:/main.qml:3 module "Fluid.Controls" plugin "fluidcontrolsplugin" not found

@luntik2012
Copy link
Contributor

luntik2012 commented Jul 7, 2018

Could you show full project?

You can try to use qbs.

Example

// ras.qbs
import qbs
import qbs.FileInfo

Project {
    minimumQbsVersion: "1.7.1"

    CppApplication {
        Depends {
            name: "Qt"
            submodules: [
                "core",
                "quick",
                "gui",
                "quickcontrols2",
                "sql",
                "widgets",
                "multimedia",
                "qml",
                "opengl",
                "concurrent"
            ]
        }

        Depends { name: "lirideployment" }

        name: "ras"

        property pathList qmlImportPaths: [
            FileInfo.joinPaths(qbs.installRoot,
                               qbs.installPrefix,
                               lirideployment.qmlDir),
            sourceDirectory
        ]


        cpp.cxxLanguageVersion: "c++11"
        cpp.includePaths: [
            "cpp",
            "cpp/goodies",
            "cpp/wrappers",
            "cpp/models",
        ]
        cpp.defines: [
            "USE_QML"
        ]

        files: [
            "cpp/*.cpp",
            "cpp/*.h",
            "cpp/goodies/*.cpp",
            "cpp/goodies/*.h",
            "cpp/models/*.cpp",
            "cpp/models/*.h",
            "cpp/wrappers/*.cpp",
            "cpp/wrappers/*.h",
            "*.qrc",
        ]

        qbsSearchPaths: [
            "third_party/fluid/qbs/shared",
            "third_party/fluid/qbs/local"
        ]

        // Properties for the produced executable
        Group {
            fileTagsFilter: "application"
            qbs.install: true
        }
    }

    SubProject {
        filePath: "third_party/fluid/fluid.qbs"

        Properties {
            withDocumentation: false
            withDemo: false
            autotestEnabled: false
        }
    }
}

.gitmodules

[submodule "third_party/fluid"]
        path = third_party/fluid
        url = https://github.com/lirios/fluid/

@daljit97
Copy link
Author

daljit97 commented Jul 9, 2018

@luntik2012 is qbs supported on Android?

@edips
Copy link

edips commented Jul 14, 2018

AFAIK qbs doesn't work for Android. To install Fluid for Android:

export ANDROID_NDK_ROOT=/home/.../android-ndk-r10e
cd fluid
mkdir build && cd build
<path/to/qt>/<android-kit>/bin/qmake ../fluid.pro CONFIG+=install_under_qt
make
make install

@plfiorini
Copy link
Member

Unfortunately qbs doesn't provide the *deployqt features yet.
In the future I would like to see if I can at least wrap androiddeployqt and solve that temporarily, until qbs provides a solution itself.

@plfiorini
Copy link
Member

@daljit97 Did you see the example on how to integrate Fluid in your qmake project?
See https://github.com/lirios/fluid/tree/develop/examples/perproject/minimalqmake

@DevDorrejo
Copy link

Ok so I did that and then I added all the fluid/qml files into the qrc of my app. But now I get the following error:

QQmlApplicationEngine failed to load component
qrc:/main.qml:3 module "Fluid.Controls" plugin "fluidcontrolsplugin" not found

That error appear because you don't have one of the dependencies installed:

https://github.com/lirios/cmake-shared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants