Re: [Interest] Unable to drag scrollbar in scroll area in Qt 5.6.3 widgets application
On Monday, 23 November 2020 21:32:10 PST Ramakanth Kesireddy wrote: > UI Application is Qt 5.6.3 widgets based on 4.14 linux kernel built with > yocto meta-qt5 recipes. Please retest with the latest first (latest Qt and latest Yocto). And if you're not using X11, please be explicit on what backend it is and what mouse input driver you're using. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel DPG Cloud Engineering ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Unable to drag scrollbar in scroll area in Qt 5.6.3 widgets application
Hi, UI Application is Qt 5.6.3 widgets based on 4.14 linux kernel built with yocto meta-qt5 recipes. For all different views like QTableView,QTreeView, am using the inbuilt QScrollBar. The mouse wheel works, the up and down arrows on the scroll bar work, but unable to drag the scroll bar using the mouse. For example, below are set for custom QTableView: setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); setVerticalScrollMode( ScrollPerItem ); setAcceptDrops(false); setDragEnabled(false); setAutoScroll(false); Do we need to enable any macro to make scrollbar drag work or do you see any issue on the above which makes the scrollbar drag doesnot works in Qt 5.6.3 or any known issues in Qt 5.6.3? Appreciate for the feedback in this regard. Thanks and Regards, Ramakanth ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Qt Widgets on Windows: set parent window, but NOT on top?
i have a main window with the menu bar then a secondary, separate window. since i want both windows to come to front when the user switches into it, and i also want the key shortcuts from the menubar to function in the second window, i set the parent of the 2nd window to the main window. doing so fixes both problems. however, when i do that, the 2nd window is ALWAYS on top of the main window, which i do not want the "always on top" flag of the 2nd window is NOT set. how do i fix this? -dave ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] how to get and purge events from queue?
that is exactly what i did and it worked like a charm. > On Nov 23, 2020, at 10:25 AM, Matthew Woehlke > wrote: > > On 05/11/2020 12.24, Jérôme Godbout wrote: >> Maybe you can add an event filter and remove some of the events if >> they are happening too close to each others. But I thing doing that >> logic into the event handler is a betetr idea, where you can either >> cumulate and delay execution of the behavior. > This. Separate your logic that decides an update is needed from the logic > that actually does the update, and have the former *queue* (if not already > queued) an event to do the latter. > > I've used this technique on quite some occasions and IIUC Qt uses it > internally when repainting widgets (n.b. QWidget::update). > > If possible, also move some of that slow logic to a different thread... > > -- > Matthew ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] How to expose a ‘index’ property to a delegate?
I had a similar issue a long time ago and I didn't want to spend much time so I used an ugly workaround. I'm interested in the proper solution, but this works https://github.com/fferri/qt3d-thing/pull/1 I think Qt 3d needs a proper "Loader" (so you can do something like this https://doc.qt.io/qt-5/qml-qtquick-loader.html#using-a-loader-within-a-view-delegate) instead of reusing NodeInstantiator. Nicolás On Mon, Nov 23, 2020 at 7:18 PM Federico Ferri wrote: > > I pushed these files and the QtC project to > https://github.com/fferri/qt3d-thing > > On 23 November 2020 at 17:49:17, Federico Ferri (federico.ferri...@gmail.com) > wrote: > > Following your advice, I changed Array.qml to the following: (most notably: > added the repeater.model property alias) > > […] > > > Cheers, > Federico Ferri > > On 23 November 2020 at 16:53:37, Giuseppe D'Angelo via Interest > (interest@qt-project.org) wrote: > > Il 23/11/20 14:20, Federico Ferri ha scritto: > > > > but of course in this example it is using a non-existent ‘index’ in the > > PhongMaterial.diffuse binding. > > Are you sure it's non-existing? The context in which that delegate is > going to be created should have "index" injected into it. > > Needless to say, all of this is deprecated in 5.15 (in favour of > required properties), and even before you were never supposed to use > unqualified properties like those. You were supposed to > > 1) always prefix them with model. > 2) expose properties on the root of the delegate, use them internally as > needed, and bind them when using the delegate in a view. > > See > https://youtu.be/vzs5VPTf4QQ?t=2240 > > HTH, > > -- > Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer > KDAB (France) S.A.S., a KDAB Group company > Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com > KDAB - The Qt, C++ and OpenGL Experts > > ___ > 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 mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Customizing the output library name in Android builds
We're in the process of migrating our Android builds from Qt 5.13.0 to 5.15.1. Something that has changed between these two versions is the default naming scheme for target libraries built using qmake. In our .pro file, we specify (for example): TARGET = MyLibrary In Qt 5.13.0, this produced an output library named 'libMyLibrary.so'. But in 5.15.1, it produces libMyLibrary_armeabi-v7a.so'. So the filename includes the architecture type as a suffix. I'm aware that this is an intentional new practice with Qt Android libraries - that binaries for all architectures are built into the same target directory, with the architecture type distinguished by a suffix within the filename. However, for reasons that I don't really want to go into here, this naming scheme is inconsistent with a bunch of other libraries that we build in a different way, and I would like to make it _not_ include the architecture suffix - I want it to output 'libMyLibrary.so' as it used to in 5.13.0. I've rummaged through all the qmake variables but haven't found one that allows me to control this behaviour, or that lets me set the actual filename that is used for the output library. Can anyone advise how to do this? Thanks, Rob Allan ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] how to get and purge events from queue?
On 05/11/2020 12.24, Jérôme Godbout wrote: Maybe you can add an event filter and remove some of the events if they are happening too close to each others. But I thing doing that logic into the event handler is a betetr idea, where you can either cumulate and delay execution of the behavior. This. Separate your logic that decides an update is needed from the logic that actually does the update, and have the former *queue* (if not already queued) an event to do the latter. I've used this technique on quite some occasions and IIUC Qt uses it internally when repainting widgets (n.b. QWidget::update). If possible, also move some of that slow logic to a different thread... -- Matthew ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] How to expose a ‘index’ property to a delegate?
I pushed these files and the QtC project to https://github.com/fferri/qt3d-thing On 23 November 2020 at 17:49:17, Federico Ferri (federico.ferri...@gmail.com) wrote: Following your advice, I changed Array.qml to the following: (most notably: added the repeater.model property alias) […] Cheers, Federico Ferri On 23 November 2020 at 16:53:37, Giuseppe D'Angelo via Interest ( interest@qt-project.org) wrote: Il 23/11/20 14:20, Federico Ferri ha scritto: > > but of course in this example it is using a non-existent ‘index’ in the > PhongMaterial.diffuse binding. Are you sure it's non-existing? The context in which that delegate is going to be created should have "index" injected into it. Needless to say, all of this is deprecated in 5.15 (in favour of required properties), and even before you were never supposed to use unqualified properties like those. You were supposed to 1) always prefix them with model. 2) expose properties on the root of the delegate, use them internally as needed, and bind them when using the delegate in a view. See > https://youtu.be/vzs5VPTf4QQ?t=2240 HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts ___ 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] How to expose a ‘index’ property to a delegate?
Following your advice, I changed Array.qml to the following: (most notably: added the repeater.model property alias) Entity { id: root property alias model: repeater.model property int length: 1 property Transform transform: Transform {} property Component itemDelegate readonly property int firstIndex: 0 property Component firstItemDelegate readonly property int lastIndex: length - 1 property Component lastItemDelegate NodeInstantiator { id: repeater model: root.length delegate: Entity { id: repeatedEntity property int index: model.index components: [ Transform { matrix: { var m = Qt.matrix4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1) for(var i = 0; i < repeatedEntity.index; i++) m = m.times(root.transform.matrix) return m } } ] NodeInstantiator { delegate: repeatedEntity.index == root.firstIndex && firstItemDelegate ? firstItemDelegate : repeatedEntity.index == root.lastIndex && lastItemDelegate ? lastItemDelegate : itemDelegate } } } } However, model.index doesn’t work in the delegate, e.g.: Array { id: root length: 10 transform.scale: 0.95 transform.translation.y: 0.5 itemDelegate: Entity { components: [ CuboidMesh { xExtent: 1.0; yExtent: 1.0; zExtent: 1.0; }, PhongMaterial { diffuse: Qt.rgba(model.index / 10, 0.5, 0.5, 1.0) shininess: 75 } ] } } (all items have the same Qt.rgba(1.0, 0.5, 0.5, 1) color) Also changing the model reference (in PhongMaterial) to root.model.index gives the same result. Cheers, Federico Ferri On 23 November 2020 at 16:53:37, Giuseppe D'Angelo via Interest ( interest@qt-project.org) wrote: Il 23/11/20 14:20, Federico Ferri ha scritto: > > but of course in this example it is using a non-existent ‘index’ in the > PhongMaterial.diffuse binding. Are you sure it's non-existing? The context in which that delegate is going to be created should have "index" injected into it. Needless to say, all of this is deprecated in 5.15 (in favour of required properties), and even before you were never supposed to use unqualified properties like those. You were supposed to 1) always prefix them with model. 2) expose properties on the root of the delegate, use them internally as needed, and bind them when using the delegate in a view. See > https://youtu.be/vzs5VPTf4QQ?t=2240 HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts ___ 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] How to expose a ‘index’ property to a delegate?
Il 23/11/20 14:20, Federico Ferri ha scritto: but of course in this example it is using a non-existent ‘index’ in the PhongMaterial.diffuse binding. Are you sure it's non-existing? The context in which that delegate is going to be created should have "index" injected into it. Needless to say, all of this is deprecated in 5.15 (in favour of required properties), and even before you were never supposed to use unqualified properties like those. You were supposed to 1) always prefix them with model. 2) expose properties on the root of the delegate, use them internally as needed, and bind them when using the delegate in a view. See > https://youtu.be/vzs5VPTf4QQ?t=2240 HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] How to disable "Semantic Issue" marker in qtcreator ?
Hi, I'm using qtcreator only for debugging. I always get "Semantic issue" markers beside the source code line numbers, which interferes with the breakpoint markers. See attached screenshot. One can not easily see what is a breakpoint. I want to get rid of the display of the "Semantic issue" markers completely but find no setting which allows to do so. Any hint ? -- Best regards/Schöne Grüße Martin A: Because it breaks the logical sequence of discussion Q: Why is top posting bad? () ascii ribbon campaign - against html e-mail /\- against proprietary attachments Frühstück, Geschenkideen, Accessoires, Kulinarisches: www.lillehus.at___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] How to expose a ‘index’ property to a delegate?
Consider a “basic” usage of NodeInstantiator: NodeInstantiator { delegate: Entity { components: [SphereMesh {radius: index / 10}] } } We can use the ‘index’ property in delegate’s properties bindings. Now consider this custom Qt3D Entity (Array.qml, repeats the delegate n times, iteratively applying the specified transform, optionally using an alternate delegate for first and/or last item): import QtQml 2.12 import Qt3D.Core 2.12 import Qt3D.Render 2.12 import Qt3D.Extras 2.12 Entity { id: root property int n: 1 property Transform t: Transform {} default property Component delegate property Component start property Component end NodeInstantiator { id: rep model: root.n delegate: Entity { components: [ Transform { matrix: { var m = Qt.matrix4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1) for(var i = 0; i < index; i++) m = m.times(root.t.matrix) return m } } ] NodeInstantiator { delegate: index == 0 && start ? start : index == (rep.model - 1) && end ? root.end : root.delegate } } } } How can this custom Entity provide an ‘index’ property to its delegate? E.g. when used like this: Array { n: 10 t.scale: 0.95 t.translation.y: 0.5 delegate: Entity { components: [ CuboidMesh { property real size: 1.0 xExtent: size; yExtent: size; zExtent: size }, PhongMaterial { diffuse: Qt.rgba(index / 10, 0.5, 0.5, 1.0) shininess: 75 } ] } } but of course in this example it is using a non-existent ‘index’ in the PhongMaterial.diffuse binding. -- Federico Ferri ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Multi-threading design along with an undo/redo stack
Can anybody take a look at this question: https://stackoverflow.com/q/64964751/3405291 Thanks ☺ ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest