Scene Builder crushes when import jar file - javafx

I try to import jars to the scene builder, I started with FXRibbon and it imported to the custom section. then I could not use the components inside(because I did not have some library called jfxtas), so I tried to import other jars and get into the mud.
But now the scene builder crashes when I try to import any jar file.
btw when I open the scene builder directly all the custom components are there...

Related

Using node_modules in Symfony 6

I want to use some node_modules in my Symfony 6 project. For example, Feather icons. But I can't figure out how to include these files without copying them to the public folder or using a CDN.
I have attempted to import the files into app.js using:
import './feather';
Sadly, this does not appear to work. Can anyone help me figure this out because I can also not find any relevant google search results.
EDIT
This is what my app.js currently looks like:
import './styles/app.css';
// start the Stimulus application
import './bootstrap';
import feather from 'feather-icons'; // <-- added line from comment

How to use/include qml module in CMake desktop application

I’m relatively new to Qt and QtQick in particular and am trying to render a PDF file in my qml application (OS: Win10, platform: Desktop). To achieve this I built QtPdf following the instructions in the Qt Wiki.
My project structure is as follows:
|myProject
|-- qml
|-- QtQuick
|-- Pdf
qmldir
plugins.qmltypes
pdfplugin.dll
[...]
main.cpp
main.qml
someComponent.qml
[...]
I’m building with CMake and added the import path like it is described here:
set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE STRING "" FORCE)
And I imported the module in my qml files using
import QtQuick.Pdf 5.15
Sadly I get a “QML module not found” exception. Obviously I’m missing something important and would be grateful if someone could point me to it.
If something is unclear or you need more information or code snippets from any files, I'm happy to provide the information needed.

Is there any way to import a folder containing Qml files, which is outside of project directory?

I have a set of Qmls which are available in a folder. Now I want to use these Qml files in a Qt project. Is there any way to import those QMLs in my project without copying the Qml folder to my project directory?
My .pro file looks like this:
RESOURCES += qml.qrc
RESOURCES += $$PWD/../QML_Assets
QML_IMPORT_PATH = $$PWD/../QML_Assets
QML2_IMPORT_PATH = $$PWD/../QML_Assets
The immediate qrc generates like this :
D:/Qt_Projects/Dummy_sample/QML_Assets/QML_2.qml
D:/Qt_Projects/Dummy_sample/QML_Assets/QML_1.qml
If i add import "../QML_Assets/" then my application starts & exits immediatly.
If I dont import this & comment the components which are used from QML_Assets folder then it works.
There is are couple of possibilities to do that in Qt.
First you can set variables in your Qt project file (.pro) to add QML imports paths.
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
QML2_IMPORT_PATH =
You can also do that directly in c++ code with QQmlEngine::addImportPath before constructing/starting your Qml view
You can then check wich import paths are set for your app with QQmlEngine::importPathList
Here is Qt documentation about Import Statements and QML Import Path specifically
And even more specific: Importing QML Document Directories

JavaFX jar file throwing exception

I've just finished my JavaFX project.
In the src file I've got some folders that each includes different files: FXML, CSS, Class, Files, Controllers.
After I build Artifacts in the IntelliJ, when I run it on cmd, the Jar file throws an exception because it can not find the FXML files!
I've copied the FXML folders next to the Jar file and a folder before it but it doesn't work
I've made packages to be clean but it has made some trouble for me!
here is a screenshot of my code
And I've made a fatherController that each controller extends from that and it has a method called load page that's how I load my FXML files
Try calling the FXMLs like this
Parent root = FXMLLoader.load(getClass().getResource("/ContactList/FXML/"+fxmlFileName+".fxml"));
I found the problem! I shouldn't Address the FXML files like the picture.
instead of "../FXML/example.fxml", Is should use "/FXML/example.fxml".

Importing a JAR into SceneBuilder not working

I am using SceneBuilder-9.0.1 and trying to use JFoenix. While trying to import the jfoenix-9.0.1.jar with the JAR/FXML Manager (Library Managger), the following error appears:
I have no problems with importing FXML files though. The same error occurs if I try to import other JARs, e.g. controlsfx.
I think it's strange that the Scene Builder wants to copy the file into \Roaming\Scene Builder/Library because that's no valid file path, isn't it? Is there any way of coyping the file manually without using the Library Manager? And if yes, where do I need to copy the JAR file to? And is this a problem of SceneBuilder or of my PC?
Thanks in advance!

Resources