Re: [Interest] Picking in Quick3D custom models and mapFrom3DScene() question
Hi After checking the qt source code, I found that I have to explicit set the camera in View3D: camera: OrthographicCamera{ id: mainCamera z: 300 } Now it works CheersJoãoEm quinta-feira, 10 de junho de 2021 18:45:29 GMT+1, joao morgado via Interest escreveu: Hi I'm trying to pick a custom model in quick3D, the model is QQuick3DGeometry based with 4 vertexs with primitive TriangleStrip (basically I'm simulating a line with width). Picking works with regular Models (Sphere, Cube, ...) but fails with my custom model. IIRC picking is still not implemented in custom models ? Does anyone know current status of picking, if it is planned for Qt 6.2 ? For now I will implement my own picking for custom models wich leads to my second question: I'm getting an error trying to use View3D.mapToScene( ), my code is something like: View3D { id: view ... OrthographicCamera{ id: mainCamera z: 300 } ...} MouseArea { id: ma anchors.fill: view onMouseXChanged: { var pos3D = view.mapTo3DScene(Qt.vector3d(mouseX, mouseY, 0)) console.log("pos3D: "+pos3D) }} The error:QML View3D: Cannot resolve scene position without a camera assigned! Am I misunderstanding how to use mapTo3DScene, is this a bug, or what am I missing ? Thank youJoão ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Using a single shared Object as a message bus throughout the application?
In my case I will keep local state contained inside, not individual buses, but I see your point. I actually much prefer Qt's API to the C++ standard library, so I don't see the avoidance of Qt as a benefit, if anything it's a disadvantage. I build all my C++ programs in Qt. I also love the automatic thread-safety (in most cases) between the signal emitter and the signal handler, where Qt creates a copy of the argument if it detects the handler is on a different thread. I looked at dedicated event bus libraries on Github and I'm not seeing what benefit they provide over a shared QObject. My components are already all QObjects. For "get or create" a bus, that's a nice idea, I guess I can have components call a "QObject* getOrCreateBus(BusesEnum bus)" function. (Sorry for the private email Jerome, this is my 1st time on a mailing list) On 2021-06-09 16:13, Jérôme Godbout - godboutj at amotus.ca wrote: ...snip Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Picking in Quick3D custom models and mapFrom3DScene() question
Hi I'm trying to pick a custom model in quick3D, the model is QQuick3DGeometry based with 4 vertexs with primitive TriangleStrip (basically I'm simulating a line with width). Picking works with regular Models (Sphere, Cube, ...) but fails with my custom model. IIRC picking is still not implemented in custom models ? Does anyone know current status of picking, if it is planned for Qt 6.2 ? For now I will implement my own picking for custom models wich leads to my second question: I'm getting an error trying to use View3D.mapToScene( ), my code is something like: View3D { id: view ... OrthographicCamera{ id: mainCamera z: 300 } ...} MouseArea { id: ma anchors.fill: view onMouseXChanged: { var pos3D = view.mapTo3DScene(Qt.vector3d(mouseX, mouseY, 0)) console.log("pos3D: "+pos3D) }} The error:QML View3D: Cannot resolve scene position without a camera assigned! Am I misunderstanding how to use mapTo3DScene, is this a bug, or what am I missing ? Thank youJoão ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Button in front of table
> On 10 Jun 2021, at 12:55, Turtle Creek Software > wrote: > > We have a QTableWidget with cells containing our QWidget subclasses. One of > them adds a temporary popup menu button and a scrolling list when clicked. > > They display OK, but clicking on them falls through to the cell widget behind > them. raise() didn't help. > > We can intercept all clicks and figure if they should go to a temporary > object, but is there an easier way to put something in front of a > QTableWidget and have it accept mouse clicks? > > Thanks, Casey McD Hey Casey, Would be good to see some code. I assume your widget subclass handles mousePressEvent to show a toplevel QWidget of Qt::Popup type, and that popup widget displays a scrolling list (perhaps it is a QListView, or it contains a QListView, or it does everything itself)? Mouse events going to that popup should not propagate beyond it. Or are you not using a popup-type toplevel widget? If you have a completely custom widget for the scrolling list view, are you ignoring any events (they are accepted by default, the default implementation of QWidget::mousePress/ReleaseEvent ignores them to let them propagate through the hierarchy). Volker ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Qt Creator can't find all usages of a symbol sometimes
Hi Alexander, What file is the Warning at the top referring to? My bet would be utils.h or utils.cpp? Does this problem ever occur for this large project without the warning appearing? If the problem tends to occur with files that have just been saved, then maybe the code scanner can't access the files because you have a virus scanner active on the project folder that kicks in shortly after any files are saved? Regards, Tony On 10/06/2021 7:47 pm, Alexander Dyagilev wrote: Hello, Why can it be? This happens in large projects. An example: Utils.cpp is opened. I right clicked PersistentStatsJsonName and chose "Find References to Symbol under cursor". Here you can see that it has failed to find the reference in this opened utils.cpp file. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Button in front of table
We have a QTableWidget with cells containing our QWidget subclasses. One of them adds a temporary popup menu button and a scrolling list when clicked. They display OK, but clicking on them falls through to the cell widget behind them. raise() didn't help. We can intercept all clicks and figure if they should go to a temporary object, but is there an easier way to put something in front of a QTableWidget and have it accept mouse clicks? Thanks, Casey McD ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Qt Creator can't find all usages of a symbol sometimes
Hello, Why can it be? This happens in large projects. An example: Utils.cpp is opened. I right clicked PersistentStatsJsonName and chose "Find References to Symbol under cursor". Here you can see that it has failed to find the reference in this opened utils.cpp file. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest