Closed Martinix75 closed 1 year ago
Found the problem .. in the prepo - Opensusetw QT6 not a package that provides "quiloader". I see if I can deceive the problem in some way! sorry for the report, but I thought it was incorporated into some "dev"
Let's say so, I downloaded the QT6.x from the QT site and put in/home/user/qt ... Now how can I say to point to/home/user/qt .. (qmake, lib et) instead of using system qt6? it's possible to do it? Of course in the future when KDE uses the QT6 everything should be much easier! (I hope)
I think that you should write export QMAKE_PATH=qmake6
into your .bashrc
, but I also did quite a lot of changes so I don't know for sure and I use a atp base Linux distro, not rpm. You can also look at this https://github.com/jerous86/nimqt/issues/2
But I am having also issues when I use ".ui" files when I am running nimqt outside of nimble. It appears to look at historical data.
Found the problem .. in the prepo - Opensusetw QT6 not a package that provides "quiloader". I see if I can deceive the problem in some way! sorry for the report, but I thought it was incorporated into some "dev"
On ubuntu QUiLoader is provided by qt6-tools-dev. On Opensuse I don't know.
Now how can I say to point to/home/user/qt .. (qmake, lib et) instead of using system qt6? it's possible to do it?
As grd mentioned, you can point the environment variable QMAKE_PATH
to the location of the qmake
binary, e.g. export QMAKE_PATH=/home/users/qt/qt6.2/bin/qmake
, and that should suffice.
But I am having also issues when I use ".ui" files when I am running nimqt outside of nimble. It appears to look at historical data.
What do you mean with "outside of nimble"? At compile time it reads the .ui file, and stores it inside the binary. So if you change the .ui file, you need to recompile for the changes to effect (use the -f
flag, I think). Or do you mean something else?
Sorry. I meant outside of nimble nimqt. I mean as a user who imports nimqt. At first I tried it with an ordinary ".ui" file and that didn't work because I set the path wrong, but then it keeps on complaining that it looks at a different ".ui" file. That is why I said that it appears that it looks at the history.
With what message is it complaining? Do you have a simple example (just the nim code, no need for .ui I think)?
@Martinix75 sorry for hijacking your issue.
@jerous86 When I copy the two files load_ui_example.[nim|ui] to another directory then it doesn't compile with the command nim cpp --run load_ui_example.nim
This is the error: /home/user/.nimble/pkgs/nimqt-0.1/nimqt/load_ui.nim(57, 25) Error: cannot open file: nimqt/qdialog
Even MS Studio Code gives an error at the line rootWg.loadUi(curFileDir/"load_ui_example.ui", createConnections=true)
This is the error:
template/generic instantiation of `loadUi` from here
candidates (edit distance, scope distance); see '--spellSuggest':
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
(2, 2): 'Dialog' [enumField declared in /home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtcore/qnamespace.nim(39, 102)]
template/generic instantiation of `loadUi` from here
But note that inside nimqt is doesn't generate an error.
Ah yes, that's probably because I have added some new Qt modules since you did your last nimble install
of nimqt.
E.g. qdialog
is present in $REPO/qt/6.4.2_minimal
, but not yet in ~/.nimble/pkgs/nimqt-0.1/
. make load_ui
will use the modules in $REPO, while your command looks in ~/.nimble/pkgs/
.
So a nimble install
in $REPO should fix it.
I'm still deciding on a sensible subset of modules to use, so it will probably change from time to time.
@Martinix75 can this be closed?
Hi, sorry, in this period I have too much work to take tests, but I promise that I will continue to do them (and to follow your job). For now I would say that it can be closed, maybe I reopen in the future!
Hi, today i was bit trying(for fun) your beautiful job (compliments!!) Afetr a little test (instal qt6 becxause i work on linux Opensuse TW) i have compiled the program "hello" (with satisfaction). But when i have try the program "example ui..." i have the error...
andrea@tec-martin:~/Scrivania> QMAKE_PATH=/usr/lib64/qt6/bin/qmake nim cpp -r qtnim.nim Hint: used config file '/home/andrea/bin/nim/config/nim.cfg' [Conf] Hint: used config file '/home/andrea/bin/nim/config/config.nims' [Conf] ............................................................................................................................................................................... CC: qtnim.nim /home/andrea/.cache/nim/qtnim_d/@mqtnim.nim.cpp:11:10: fatal error: QtUiTools/quiloader.h: No such file or directory 11 | #include "QtUiTools/quiloader.h" | ^
~~~~~~ compilation terminated. Error: execution of an external compiler program 'g++ -c -std=gnu++14 -funsigned-char -w -fmax-errors=3 -fpermissive -std=c++17 -I/home/andrea/.nimble/pkgs/nimqt-0.1 -I/usr/include/qt6 -fPIC -I/home/andrea/bin/nim/lib -I/home/andrea/Scrivania -o /home/andrea/.cache/nim/qtnim_d/@mqtnim.nim.cpp.o /home/andrea/.cache/nim/qtnim_d/@mqtnim.nim.cpp' failed with exit code: 1am I wrong something, or is there a "bug"? thanks by Andrea M.