-
Notifications
You must be signed in to change notification settings - Fork 827
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
Add qml #449
base: master
Are you sure you want to change the base?
Add qml #449
Conversation
to test a QML form that integrate node editor
For multiple input and custom color for each node
project(QtNodesLibrary CXX) | ||
|
||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMAKE_MODULE_PATH is a list. Better use list(APPEND
. See https://stackoverflow.com/questions/52730397/how-can-i-set-cmake-module-path-for-doing-regular-and-out-of-source-builds-in-cm
@@ -188,12 +186,6 @@ if(NOT "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") | |||
) | |||
endif() | |||
|
|||
if(QT_NODES_DEVELOPER_DEFAULTS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is not defined anywhere.
@@ -17,7 +17,7 @@ set(CALC_HEADER_FILES | |||
|
|||
add_executable(calculator | |||
${CALC_SOURCE_FILES} | |||
${CALC_HEAEDR_FILES} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Miss spelling
CMakeLists.txt
Outdated
@@ -51,7 +51,7 @@ else() | |||
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Widgets) | |||
endif() | |||
|
|||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Gui OpenGL) | |||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Gui OpenGL Quick) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QML needs Quick
@@ -0,0 +1,211 @@ | |||
#include "QmlWrapper.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapper stolen from musescore project
@@ -485,6 +485,7 @@ void DataFlowGraphModel::loadNode(QJsonObject const &nodeJson) | |||
onOutPortDataUpdated(restoredNodeId, portIndex); | |||
}); | |||
|
|||
model->load(internalDataJson); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember why but QtNodes crashes with _models[restoredNodeId]->load(internalDataJson);
.
@@ -6,3 +6,11 @@ add_executable(acquisition_viewer ${ACQ_SOURCE_FILES} ${ACQ_HEADER_FILES} | |||
CMakeLists.txt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to add WINDEPLOYQT_EXECUTABLE for all examples ?
@@ -162,6 +162,12 @@ void GraphicsView::centerScene() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve qml widget
@@ -1,4 +1,4 @@ | |||
get_filename_component(QtNodes_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | |||
@PACKAGE_INIT@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Config.cmake.in pattern from CMake documentation
examples/calculator_qml/main.qml
Outdated
@@ -8,60 +8,14 @@ Window { | |||
height: 1000 | |||
visible: true | |||
|
|||
ChartView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace ChartView by Button. This component is only to avoid having WidgetView at position 0, 0.
As I said in #429 it's hard to split every feature because I made (small) modification in lots of files so it's hard to have multiple PR that to conflict each others.
I think that it's better to convince you that every commit is fine :)
If you don't like some commits, I will remove them.
I wrote comments on almost every commit to add more context.
If you are fine with some commit, I can create another PR with these commits to reduce the size of the current PR.
I know this PR is huge :/ Don't hesitate to send me feedback or if you want I make some changes in this PR.