comboBox, QuickView
Details
- Reviewers
mlaurent - Group Reviewers
Ruqola - Commits
- R865:53b37cdb36d0: Create test app to test qml files
Create a widget and add combobox, label, button as user interface and use QQuickView to load qml files in seperate window
Diff Detail
- Repository
- R865 Ruqola
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
now your error that you see when you try to load Desktop.qml normal as you didn't use RuqolaRegisterEngine
So you need to link with libruqolacore, initialize it etc.
And it will good if combobox is initialize with all qml file.
> you need to find a method for load them from current directory, so it avoids that I need to open it directly.
But we need to keep 'Add file' .
Regards
Modify the code according to commemts
tests/qmltest.cpp | ||
---|---|---|
18 | Sry, I forgot to change it to QStringLiteral after taking it from Qt help doc | |
34 | I think here we are creating pointers and memory allocated for that will not be deleted by default destructor and it should be done by an user defined destructor. to avoid MEMORY LEAK | |
66 | Do we have any idea of what type of Identifier is to be used to identify files in (QVariant argument) |
I think that it still not work with current qml as you didn't use ruqolaengine...
tests/qmltest.cpp | ||
---|---|---|
66 | A enum or other. As you want, just a specific value. | |
tests/qmltest.h | ||
46 | ????? why in header ??? |
I'm getting following errors:
Starting /home/veluri/ruqola/build/tests/qmlFileTest...
qrc:/TakeVideoMessageDialog.qml:45:42: Unable to assign [undefined] to int
The program has unexpectedly finished.
The process was ended forcefully.
/home/veluri/ruqola/build/tests/qmlFileTest crashed.
After commenting that line 45 line in TakeVideoMessageDialog.qml also I'm getting error
Starting /home/veluri/ruqola/build/tests/qmlFileTest...
The program has unexpectedly finished.
The process was ended forcefully.
/home/veluri/ruqola/build/tests/qmlFileTest crashed.
Check the file whether it is present in qrc:/ directory
if not, again take input from user.
tests/qmltest.cpp | ||
---|---|---|
30 | where are the signal/slot for combobox and pushbutton ? | |
32 | add parent | |
35 | You forgot to delete it in destructor | |
61 | Else ? | |
70 | I want the list no if file is in qrc:/ otherwise I need to know the name. Perhaps you can create liste from file in source dir directly. |
Write else case if engine not initialized
tests/qmltest.cpp | ||
---|---|---|
30 | Signal and slot for pushButton are connected. But, why signal for combobox? | |
70 | Why do we need a list? Now, it will check for input file in qrc:/ repository and if entered filename is not there in repo it again prompts the user to give filename. |
I'm getting the following error when I try to log the warning in RUQOLA_LOG although it is defined in ruqola_debug.h
/home/veluri/ruqola/tests/qmltest.cpp:64: error: undefined reference to `RUQOLA_LOG()'
In cmakeLists.txt also I think there is no need to target_link_libreries link QT5::widget
Since all those are linked in libruqolacore :)
tests/qmltest.cpp | ||
---|---|---|
30 | Ah you have a button for loading it... indeed not necessary to have a slot for it. | |
70 | Because I don't want to know all qml filename :) it's great to add new qml filename but for existing files I don't want to know each name. |
tests/CMakeLists.txt | ||
---|---|---|
79 | here I think there is no need to link Qt5::Widgets, Qt5::Quick since those 2 were already linked in libruqolacore |
Please kindly check, our ruqolaRegisterEngine is not initializing , were are getting errors :/ already mentioned those in prev. comments
tests/CMakeLists.txt | ||
---|---|---|
76 | lowercase for test apps thanks. | |
tests/qmltest.cpp | ||
37 | remove space after ":" | |
61 | remove extra (...) | |
72 | now we can see qml file it's good, | |
85 | We can't add an external file ? | |
89 | when you cancel it it doesn't cancel. | |
108 | use combobox->currentData() after changes | |
tests/qmltest.h | ||
2 | it's your copyright no ? |
Modify the code for dialogBox
tests/qmltest.cpp | ||
---|---|---|
61 | This is not the extra method it is used in loadCombobox method. |
tests/qmltest.cpp | ||
---|---|---|
61 | I asked to remove '(' and ')' :) |
tests/qmltest.cpp | ||
---|---|---|
24 | ok but line with RUQOLA_LOG is commented no ? |