Re: [Interest] Update widget geometry BEFORE window shown
Well, I wasn't going to say anything ("If you don’ know how to answer it, please don’t chime in, thanks.") In my experience, Qt doesn't maintain a good notion of a window's size until it's shown. But you are guaranteed a Resize event as the window is being shown, so if you can manage it, you need to handle the Resize event and do your polishing and layouting there. In fact, I had for a while a function called ShowAndHideInvisibly(); the important part of it was like this: > getQWidget()->setAttribute(Qt::WA_DontShowOnScreen, true); > WMshow(); > WMhide(); > getQWidget()->setAttribute(Qt::WA_DontShowOnScreen, false); Maybe that helps. Setting the attribute prevents the screen flash. -John Weeks WaveMetrics, Inc. > On May 23, 2024, at 3:52 PM, David M. Cotter wrote: > > I need to do something like this: > > windowP->layout()->updateGeometry(); // causes all widget geometry to update > DoSomethingImportant(windowP->GetWidget(“someWidget”).geometry()); // do > something with the geometry of a widget (which must be up to date) > windowP->setGeometry(windowP->GetInitialGeometry()); // pos/size now based on > the fact that we KNOW the geometry of one of the widgets BEFORE the window is > shown > windowP->show(); // only NOW show the window, NOT before now > > How do I do something like the first line? Cause all widget geometry > (Recursively), to know / figure out its size AND position? And this BEFORE > the window or any widget is “shown” via the windowP->show() command? > > Please don’t try to tell me to do it differently. If you don’ know how to > answer it, please don’t chime in, thanks. > > -Dave > ___ > 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] spurious breakpoints in Qt Creator
I haven't done any Qt development for Linux, but I know on other platforms it's possible to set a preference to break on exceptions, or module loads and unloads, and other such events. Somewhere I believe you can request a break when main() is entered, too. > On May 15, 2022, at 12:44 PM, Matej Košík wrote: > > Hi, > > While using Qt Creator, I noticed that it generates "spurious breakpoints". > > How to reproduce: > - I start Qt Creator > - I generate a new project > (Qt Widgets Application with QMainWindow as a base class) > - from the menu I choose > - Debug >- Start Debugging > - Start debugging of startup project > > then the debugged project first stops in "gtk3/main.cpp" and then stops > in other places. > > When I let the program continue, it then stops again in the file > "ico/main.cpp". > > When I let the program continue, it then stops again in the file > "pdf/main.cpp". > > I guess that I am doing something wrong, but I am unable to figure out > what. Any help is welcome. I would like the program to stop only in > breakpoints defined by me. > > I am using: > - Linux (version 5.10.0-14-amd64) > - GNOME (version 3.38.5) > - Qt Creator (4.14.1) > - Qt (version 6.3 compiled from source) > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] fixit in Creator 7.01
Our old code has tons of assignments inside if statements, like: if (err = somefunction()) return err; These are flagged by the clangd suggesting that it should be either if ( (err = somefunction()) ) or if (err == somefunction()) In the past, if you left-clicked on the little light bulb at the end of the line, it would put up a menu of fixits, offering a choice of those two fixes. In 7.01, when I left-click, it simply goes ahead and applies the *second* fix without presenting a choice. That, of course, creates a very hard-to-see bug. I can just barely see where someone might think this change is a good idea, but it seems more likely to be a bug. Thought I would ask before filing a bug, as I'm not very good at searching the bugs data base. At one point, I clicked on the yellow triangle in the left margin and got the little fixit widget. I clicked on the one I wanted (adding parens) and it applied BOTH fixes! -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] debugging on Macintosh
> This happened to a colleague (sort of). He could debug one executable but not > any of the other ones. We tried QtCreator 4.x, 6.x and 7.x. What we finally > did was move his QtCreator configuration directory to the side and relaunch > QtCreator. That seemed to fix it. Seems like a sledge hammer but it did work. Interesting. That would ~.config/QtProject? And then you have to re-create all your kits, etc.? -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] debugging on Macintosh
I recently lost the ability to debug on my Macintosh. To be sure, we are building with an oldish Xcode and a new Qt Creator. This morning, though, I downloaded Qt Creator 7.01. For a brief, shining moment, I was able to break at a breakpoint, single-step and all the rest. Then I tried again. Gone again. The breakpoints while running still have the X on them. Mac OS: 10.14.6 Xcode: 10.3 Qt Creator: 7.01 What should I be checking? The fact that I was able to debug briefly today suggests that there is some setting or, or... something that could be changed to restore my ability to debug. -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] alphabetize the symbol menu?
With the clangd code model in the latest versions of Qt Creator, we seem to have lost the ability to order the menu of symbols in an editor window alphabetically. That would be the menu in the bar above the area holding editor windows and views. Am I missing something? -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] QTextLayout::setPreeditArea()
Maybe something related to an input method? Input methods are used for things like composing Japanese characters. -John Weeks > On Jan 3, 2022, at 2:31 PM, Joshua Grauman wrote: > > Hi all, > > I am working on using QTextLayout and I was wondering if someone could give > me a quick explanation for what preedit text / preedit area was in this > context? There's not much detail in the docs, reading the Qt code and > googling hasn't helped me much. > > When/why would you use setPreeditArea(int pos, QString text) vs > setText(QString). What's a preedit area? > > Thanks in advance, > > Josh > ___ > 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] semi-modal dialog
We do something similar- we make it possible to put up a control panel (a special type of window in our application) that allows the user to interact in certain ways with one other window and no others. We do it with some very hairy code that probably would make Thiago throw up. We fake the modal nature of this partially modal window by installing an event filter on the application. Then we just block all the events that shouldn't get through. Getting the choice of events right can be very tricky! The ugliest bit is responding to window activation to force the active window back to the one we want to be active. Hopefully, someone has a better solution to this problem! > On Jul 29, 2021, at 3:21 PM, Scott Bloom wrote: > > Here is my problem. > > I have a progress dialog, that I need to be able to use as a modal dialog > with respect to the main window (a QMainWindow class, which is also its > parent widget). > > But, I need to still be able to minimize the main application and even move > it. > > Any ideas on the best way to implement something like this? > > Scott > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] qSort replacement
Lambdas as predicates are supported in C++11, too. > On Jul 21, 2021, at 9:22 AM, Rainer Wiesenfarth > wrote: > > On Wed, Jul 21, 2021 at 6:07 PM Joshua Grauman wrote: > [...] I can't figure out how to > use std::sort to sort a QList with a custom compare function. [...] > bool variantLessThan(const QVariant , const QVariant ) > { > return v1.toString() < v2.toString(); > } > > qSort(fieldsList.begin(), fieldsList.end(), variantLessThan); > [...] > > If you are using C++17 you may also use lambdas: > > std::sort(fieldsList.begin(), fieldsList.end(), [](const QVariant , const > QVariant ) { > return v1.toString() < v2.toString(); > }); > > (untested) > > Cheers, Rainer > > -- > Software Engineer | Trimble Imaging Division > Rotebühlstraße 81 | 70178 Stuttgart | Germany > Office +49 711 22881 0 | Fax +49 711 22881 11 > http://www.trimble.com/imaging/ | http://www.inpho.de/ > > Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim > Eingetragen beim Amtsgericht Darmstadt unter HRB 83893, > Geschäftsführer: Rob Reeder, Jürgen Kesper > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [EXTERNAL] Re: Send Data to JavaScript
On 12.04.2021 20:48, Jérôme Godbout wrote: Have you tried with a QVariantMap for your Q_PROPERTY instead? Will be dull to convert from QVAriant to list and string for each values, but will probably work. I've not tried using that, but looking at it, wouldn't it mean that I'd have to convert it each time to get the QStringList? -- John Schneiderman Senior Software Engineer CDPR Squad GOG.com OpenPGP_0xB23C7A7C8E96CE3B.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [EXTERNAL] Re: Send Data to JavaScript
On 12.04.2021 16:12, Giuseppe D'Angelo via Interest wrote: But a similar consideration applies: do you have any documentation telling you how datatypes in C++ are mapped to datatypes in JS -- and thus if your QMap is supposed to be supported, or if instead you need to "massage" it a bit? The only thing that I've been able to find is the mapping for JSON and QVariant. And it shows that QMap, QString, and QStringList all can be mapped into a QVariant. -- John Schneiderman Senior Software Engineer CDPR Squad GOG.com OpenPGP_0xB23C7A7C8E96CE3B.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [EXTERNAL] Re: Send Data to JavaScript
On 12.04.2021 15:35, Giuseppe D'Angelo via Interest wrote: Are you sure about the transformation? Only certain data types are supported for the C++ <-> QML data exchange, and I don't believe the one you're using is: I'm not using QML in this particular case. I'm using QWebEngine and QWebChannel for communication between C++ and the JavaScript running. -- John Schneiderman Senior Software Engineer CDPR Squad GOG.com OpenPGP_0xB23C7A7C8E96CE3B.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Send Data to JavaScript
I'm attempting to send data to the JavaScript side of the QWebEngine code. This data is being emitted via a signal. The registration is connected correctly as other components work just fine, though they're emitting only a single int or QString. An example of what I'm attempting is below: class Demo : QObject { Q_OBJECT public: Q_PROPERTY( QMap mappings MEMBER mappings_ NOTIFY mappingsChanged ) }; What I'm expecting is that mappings would be transformed on the JavaScript side as: mappings { "key" : ["abc", "def"]... } However, when I try to view the data in the emitted signal it's always null. Any suggestions where I should look for more answers or perhaps I'm going in an incorrect direction? Thanks, -- John Schneiderman Senior Software Engineer CDPR Squad GOG.com OpenPGP_0xB23C7A7C8E96CE3B.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Frame count from MediaPlayer QML while playing
Hello, I would like to get the frame count of the video that's been played by the MediaPlayer in QML, but I didn't find any property that will provide it. As the video is made up of frames , I have corresponding annotations per frame in the database that I would like to fetch using the frame number as index. Any way I could access the frame count? (the current frame number thats rendered) ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates
On Mon, Mar 22, 2021 at 10:55 AM Alex john wrote: > Transform { > id: trefoilMeshTransform > translation:Qt.vector3d(Qt.vector2D(100, 100)).unproject( > modelView ,mainCam.projectionMatrix, forwardRenderer.viewportRect) > property real theta: 0.0 > property real phi:0.0 > property real roll: 0.0 > rotation: fromEulerAngles(theta, phi, roll) > scale: root.scale > } I used the following function to get the 3d coordinates using the 2d, by refering to the source code https://code.woboq.org/qt5/qtbase/src/gui/math3d/qvector3d.cpp.html#_ZNK9QVector3D9unprojectERK10QMatrix4x4S2_RK5QRect I need to render the 3d cube exactly where the Rectangle{x:100, y:100} renders however there is lot of offset and I think the calculations is somewhere going wrong. Can clue ? function projectPointsto3d(){ var ptX = 100 var ptY = 100 var windowPt = Qt.vector4d(ptX,ptY,1,1) var mat = mainCam.projectionMatrix.times(mainCam.viewMatrix) var inverse = mat.inverted() var normalize = Qt.vector4d(1,1,1,1) windowPt.x = (windowPt.x - forwardRenderer.viewportRect.x)/forwardRenderer.viewportRect.width windowPt.y = (windowPt.y - forwardRenderer.viewportRect.y)/forwardRenderer.viewportRect.height windowPt = windowPt.times(2).minus(normalize) var a = inverse.times(windowPt) var division = a.w (if i use (1/a.w) teh 3d values will be very high and I do not see object) a = a.times(division) return a.toVector3d() } ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates
On Mon, Mar 22, 2021 at 10:55 AM Alex john wrote: > > On Thu, Mar 18, 2021 at 5:22 AM Walter Rawdanik wrote: > > > > You can’t convert 2d coordinates to a 3d position because you are missing > > the z coordinate. > > I can have a dummy z value as 1 for the calculation. The problem is > similar as described here > https://community.khronos.org/t/getting-2d-to-3d/20050/6 in opengl > they could fetch the requirted matrix for gluUnProject and get the 3d > coordinates from 2d. However, in Qt3d, I'm stuck to fetch the required > matrix i.e modelView etc and pass it correctly to the > vector3d::uproject and get the corresponding 3d points back. All I > could do is the following, however I doubt the correctness of it. > > // The code is exactly same as wireframe example file TrefoilKnot.qml > > Transform { > id: trefoilMeshTransform > translation:Qt.vector3d(Qt.vector2D(100, 100)).unproject( > modelView ,mainCam.projectionMatrix, forwardRenderer.viewportRect) > property real theta: 0.0 > property real phi:0.0 > property real roll: 0.0 > rotation: fromEulerAngles(theta, phi, roll) > scale: root.scale > } > > In translation, Qt.vector2D(100, 100) is where I give the x,y (window > coordinates) and expect the unproject api will return the 3d points > for translation. mainCam.projectionMatrix and > forwardRenderer.viewportRect are set from BasicCamera and > Forwardrenderer from main.qml respectively. And I do not know where to > get modelView. If you let me know the modelView matrix and confirm the > above changes are right, I'll be thankful. > > Do let me know. Can anyone let me know about this? ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates
On Thu, Mar 18, 2021 at 5:22 AM Walter Rawdanik wrote: > > You can’t convert 2d coordinates to a 3d position because you are missing the > z coordinate. I can have a dummy z value as 1 for the calculation. The problem is similar as described here https://community.khronos.org/t/getting-2d-to-3d/20050/6 in opengl they could fetch the requirted matrix for gluUnProject and get the 3d coordinates from 2d. However, in Qt3d, I'm stuck to fetch the required matrix i.e modelView etc and pass it correctly to the vector3d::uproject and get the corresponding 3d points back. All I could do is the following, however I doubt the correctness of it. // The code is exactly same as wireframe example file TrefoilKnot.qml Transform { id: trefoilMeshTransform translation:Qt.vector3d(Qt.vector2D(100, 100)).unproject( modelView ,mainCam.projectionMatrix, forwardRenderer.viewportRect) property real theta: 0.0 property real phi:0.0 property real roll: 0.0 rotation: fromEulerAngles(theta, phi, roll) scale: root.scale } In translation, Qt.vector2D(100, 100) is where I give the x,y (window coordinates) and expect the unproject api will return the 3d points for translation. mainCam.projectionMatrix and forwardRenderer.viewportRect are set from BasicCamera and Forwardrenderer from main.qml respectively. And I do not know where to get modelView. If you let me know the modelView matrix and confirm the above changes are right, I'll be thankful. Do let me know. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates
I did the following changes to the wireframe example (Trefoilknot.qml file translation property of transform) but still unable to get the modelView Matrix, and also not sure whether the following changes to translation are right If anyone can confirm and let me know property var mainCam // got the mainCamera ID from main.qml (wireframe example) property var forwardRenderer //forwardRendered id from main.qml (wireframe example) Transform { id: trefoilMeshTransform *translation:Qt.vector3d(Qt.vector2D(4, 4)).unproject( *modelView* ,mainCam.projectionMatrix, forwardRenderer.viewportRect)* property real theta: 0.0 property real phi: 0.0 property real roll: 0.0 rotation: fromEulerAngles(theta, phi, roll) scale: root.scale } /* *translation* : Qt.vector2D(100, 100) is where I intend to give window 2d coordinates(here its x:100, y:100)and I assume that unproject api will convert the 2d points to 3d and renders the 3d object exactly at 100, 100 pixel 2d location */ I got the projectionMatrix from camera, viewPortRect from ForwardRenderer in Rendering settings. I'm completely stuck for this step. If anyone can please confirm the changes and let me know the modelView matrix. On Mon, Mar 15, 2021 at 5:14 PM Alex john wrote: > > Going the other way round (back-projection) can be done by e.g. > QVector3D::unproject() > > Thanks, as I'm referring the the wireframe example I was able to get > the camera projection matrix from Camera Qml. However, I'm unsure how > to get the ModelView matrix and the viewport. > > As I have loaded my custom obj in wireframe example and using the same > geometry and camera settings as its for wireframe, therefore can you > please let me know how this can be done at QML side? I did try to find > this in the documentation but didn't find the usage. > > > > > > On Mon, Mar 15, 2021 at 11:03 AM Alex john > wrote: > >> > >> Hello , > >> > >> Im successessfully able to load the obj file in Scene3D, and by using > >> fromEulerAngles I'm able to get the required yaw, pitch and > >> roll.However, I'm not able to use the right translation to get the > >> object rendered. I get the x,y coordinates in pixels from the other > >> module and I need to render the 3d model exactly at that pixel > >> location. It turns out that the Transform type has translation and it > >> takes the input in 3d coordinates (not sure which unit) if I try to > >> assign the x,y coordinates to the 3d coordinates it renders somewhere > >> else. Seems like the x,y in the translation is not the pixel 2d > >> values, as even with a x=0.3 it deflects more than expected. > >> > >> Is there a way to assign the x,y 2d pixel values (as we do for > >> Rectangle {x: 100, y:100}) to the translation so that it is rendered > >> to the right place where it's desired. > >> ___ > >> 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] [Qt3d] Rendering 3D object with 2D coordinates
> Going the other way round (back-projection) can be done by e.g. > QVector3D::unproject() Thanks, as I'm referring the the wireframe example I was able to get the camera projection matrix from Camera Qml. However, I'm unsure how to get the ModelView matrix and the viewport. As I have loaded my custom obj in wireframe example and using the same geometry and camera settings as its for wireframe, therefore can you please let me know how this can be done at QML side? I did try to find this in the documentation but didn't find the usage. > On Mon, Mar 15, 2021 at 11:03 AM Alex john wrote: >> >> Hello , >> >> Im successessfully able to load the obj file in Scene3D, and by using >> fromEulerAngles I'm able to get the required yaw, pitch and >> roll.However, I'm not able to use the right translation to get the >> object rendered. I get the x,y coordinates in pixels from the other >> module and I need to render the 3d model exactly at that pixel >> location. It turns out that the Transform type has translation and it >> takes the input in 3d coordinates (not sure which unit) if I try to >> assign the x,y coordinates to the 3d coordinates it renders somewhere >> else. Seems like the x,y in the translation is not the pixel 2d >> values, as even with a x=0.3 it deflects more than expected. >> >> Is there a way to assign the x,y 2d pixel values (as we do for >> Rectangle {x: 100, y:100}) to the translation so that it is rendered >> to the right place where it's desired. >> ___ >> 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] [Qt3d] Rendering 3D object with 2D coordinates
Hello , Im successessfully able to load the obj file in Scene3D, and by using fromEulerAngles I'm able to get the required yaw, pitch and roll.However, I'm not able to use the right translation to get the object rendered. I get the x,y coordinates in pixels from the other module and I need to render the 3d model exactly at that pixel location. It turns out that the Transform type has translation and it takes the input in 3d coordinates (not sure which unit) if I try to assign the x,y coordinates to the 3d coordinates it renders somewhere else. Seems like the x,y in the translation is not the pixel 2d values, as even with a x=0.3 it deflects more than expected. Is there a way to assign the x,y 2d pixel values (as we do for Rectangle {x: 100, y:100}) to the translation so that it is rendered to the right place where it's desired. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Drawing Frustum on Scene3D
But in quick3D that would be done with a class derived from QQuick3DGeometry with primitives set to lines "setPrimitiveType(QQuick3DGeometry::PrimitiveType::Lines)" to construct a cube. Then register that class to qml and use it in your View3D. Hope it helps. Any alternative to QQuick3DGeometry as I'm using 5.10? On Fri, Mar 5, 2021 at 5:00 PM joao morgado wrote: > > Hi > > That frustum is just a group of lines in cube shape, you see it as a frustum > because the camera is in perspective mode. > I never used Qt3D so cannot help with scene3d. > But in quick3D that would be done with a class derived from QQuick3DGeometry > with primitives set to lines > "setPrimitiveType(QQuick3DGeometry::PrimitiveType::Lines)" > to construct a cube. Then register that class to qml and use it in your > View3D. Hope it helps. > > João > Em sexta-feira, 5 de março de 2021 09:46:15 GMT, Alex john > escreveu: > > > Hello Qt > > I like to render a frustum as here https://imgur.com/a/BzmCQ2D on > Scene3d. Can you let me know how it can be done? If I have to get the > custom QML ,do I have to get it from the C++ and then push it to the > QML context? Any pointers to basic code is appreciated. > > Thanks. > ___ > 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] Drawing Frustum on Scene3D
Hello Qt I like to render a frustum as here https://imgur.com/a/BzmCQ2D on Scene3d. Can you let me know how it can be done? If I have to get the custom QML ,do I have to get it from the C++ and then push it to the QML context? Any pointers to basic code is appreciated. Thanks. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Rendering 3d object on webcam video
try putting the camera first, then setting the clear colour of your frame graph to “transparent” ? Perfect! that worked, many thanks. :) On Wed, Mar 3, 2021 at 9:44 PM Mike Krus wrote: > > Hi > > try putting the camera first, then setting the clear colour of your frame > graph to “transparent” ? > > > Mike > > > On 3 Mar 2021, at 14:28, Alex john wrote: > > > > > > Hello, > > > > I am trying to overlay a 3d object(.obj file) on top of the video, I could > > successfully load the .obj file and rendered it by refering to example > > https://doc.qt.io/qt-5/qt3d-wireframe-example.html, later I changed the > > code in main.qml by raping Entity from main.qml into Scene3D and tried to > > get the webcam rendered using QtMultimedia as below. > > > > Rectangle{ > > > > Scene3D{ > > anchors.fill: parent > > focus: true > > > > Entity { > > id: root > > > > // Render 3d object same code as in > > https://doc.qt.io/qt-5/qt3d-wireframe-example.html > > > > } > > > > > > } > > Camera { > > id: camera > > imageProcessing.whiteBalanceMode: > > CameraImageProcessing.WhiteBalanceFlash > > exposure { > > exposureCompensation: -1.0 > > exposureMode: Camera.ExposurePortrait > > } > > > > flash.mode: Camera.FlashRedEyeReduction > > > > > > } > > > > VideoOutput { > > source: camera > > anchors.fill: parent > > //focus : visible // to receive focus and capture key events > > when visible > > } > > > > } > > > > However, what happens is either the camera video is seen or the 3d object > > based on the sequence whichever is last. How can I get the 3D object on top > > of the video? any clues? > > ___ > > Interest mailing list > > Interest@qt-project.org > > https://lists.qt-project.org/listinfo/interest > > — > Mike Krus | mike.k...@kdab.com | Senior Software Engineer & Teamlead > KDAB (UK) Ltd., a KDAB Group company > Tel: UK Office +44 1625 809908 Mobile +44 7833 491941 > KDAB - The Qt Experts, C++, OpenGL Experts > > ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Rendering 3d object on webcam video
Hello, I am trying to overlay a 3d object(.obj file) on top of the video, I could successfully load the .obj file and rendered it by refering to example https://doc.qt.io/qt-5/qt3d-wireframe-example.html, later I changed the code in main.qml by raping Entity from main.qml into Scene3D and tried to get the webcam rendered using QtMultimedia as below. Rectangle{ Scene3D{ anchors.fill: parent focus: true Entity { id: root // Render 3d object same code as in https://doc.qt.io/qt-5/qt3d-wireframe-example.html } } Camera { id: camera imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash exposure { exposureCompensation: -1.0 exposureMode: Camera.ExposurePortrait } flash.mode: Camera.FlashRedEyeReduction } VideoOutput { source: camera anchors.fill: parent //focus : visible // to receive focus and capture key events when visible } } However, what happens is either the camera video is seen or the 3d object based on the sequence whichever is last. How can I get the 3D object on top of the video? any clues? ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Security message when I download Qt Creator?
I just downloaded the latest Qt Creator (I keep hoping a new update will fix the Application Output pane's buffering problem). Chrome on Mac OS 10.14.6 wouldn't download it because "the file cannot be downloaded securely". Is this a Chrome issue, or was the dmg not marked properly, or perhaps this happens with any dmg these days? I did ultimately manage to download it by right-clicking, selecting Save Link As and then clicking the status tile at the bottom of the window, where there was a choice to go ahead anyway. -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Emit Signal From JavaScript
I have a QObject available on the JavasScript side of the Qt WebEngine. I can read properties, call slots, etc. However I cannot emit signals from the object. I cannot find documentation on how to do that, e.g. window.cppobj.signal I can of course have a slot called emitSignal, but that seems like unnecessary boilerplate. Is it possible to -- John Schneiderman Senior Software Engineer GOG.com ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Qt Creator debugger does not flush "Application Output" on every log call?
Yay I've posted about this myself... I wish I could vote for your bug report many times. > On Sep 20, 2020, at 1:13 PM, David M. Cotter wrote: > > Do you develop on mac? > > Do you print stuff to console (qDebug) to aid with debugging? > > When you hit a breakpoint, do you find that, quite often, your log hasn't > been flushed? ie: you can't see the latest logging, the "Application Output" > is stuck somewhere in the past... > > Does this happen to you? Seems like a bug. > > If this drives you nuts, please upvote this bug i've filed. Thanks. > > > -dave > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Bug in QCodoaWindow?
Thanks, Andy. You're quite right. Now I'm trying to think about troubles I've had that require parens, and can't remember... Maybe I was mixing bitwise & and bitwise | (or). And certainly it's easy to write buggy code mixing && and ||. I was primed to find something wrong: I've been getting what as far as I can tell are bad window state change events telling me that a window is maximized when it isn't. Plays dicky with certain parts of my code! > On Aug 27, 2020, at 2:25 PM, Andy wrote: > > Bitwise "&" has precedence over logical "&&", so I think this is alright. > -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Bug in QCodoaWindow?
Isn't this a bug? bool QCocoaWindow::isTransitioningToFullScreen() const { NSWindow *window = m_view.window; return window.styleMask & NSWindowStyleMaskFullScreen && !window.qt_fullScreen; } Seems like the bitwise & needs parens. This is from Qt 5.12.9. Haven't checked Qt 5.15. -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] macOS Big Sur ARM Build
At the point where Apple almost released 64-bit Carbon, but reversed course and made us all switch to writing things with funny square brackets instead, Carbon had been largely ported to 64 bits. There is still quite a bit of Carbon under the hood in Cocoa. -John Weeks WaveMetrics, Inc. > On Jun 24, 2020, at 8:50 AM, David M. Cotter wrote: > >> Apple ... said that they are still supporting carbon ... on the ARM based >> Macs > > wait what? > > reference please? > > carbon is 32bit. 32bit is dead on Catalina, right? and Big Sur is > post-catalina. so... have i missed something? > ___ > 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 get 3 pixel focus ring?
One thing to be aware of when using QMacStyle or QWindowsStyle is that they are trying to emulate the Macintosh or Windows mandated look. The blue focus ring is a Macintosh thing, and like many things Apple, it comes in one size. The width of the blue line is mandated. On Windows, when I ran your test, it looks like you are getting the standard Windows dotted-line focus ring. Usually it's a bit inset from the edges of the edit box, though. Once again, QWindowsStyle is giving you the Windows look, and that's it. You might try Fusion style, we have found that the look isn't bad, but it doesn't look like either Windows or Macintosh. Hope this helps -John Weeks > On Jun 8, 2020, at 12:48 PM, David M. Cotter wrote: > > can anyone explain why tree view looks fine but table view only has 1 pixel? > > @adam did you download the example project? it's trivial to run and you can > test several implementations. which impl would be used with your suggestion > of PM_FocusFrame margins? > and do you have maybe example code to implement your suggestion? > > part of my question is: is this a bug in Qt ? because IMHO "QFocusFrame" > should "just work", and why does it NOT? > > or setting the style to 3 px should "just work" and why does it NOT work but > only for certain widgets? > > you'd think that QFocusFrame would *manage* the clipping properly? > > or the doc should be more clear, with sample code, cuz i've read the doc > several times and am no further along :( > > any help would be greatly appreciated! if you like karaoke, i have an app > for you ;-) > > -dave > >> On Jun 8, 2020, at 5:18 AM, Adam Light wrote: >> >> On Sun, Jun 7, 2020 at 2:21 PM David M. Cotter wrote: >> i have an example project (see below), that tries 6 different >> implementations, attempts to make the focus ring 3 pix wide. None of them >> work on windows, and only one of them PARTIALLY works on mac. What i want is >> the style you get around a text edit on mac, but i want that style on ALL >> widgets, and i want it on windows too. >> >> anyone have any idea how i can accomplish this? >> >> It might be as simple as returning a different value for >> QStyle::PM_FocusFrameHMargin and QStyle::PM_FocusFrameVMargin in a >> QStyle::pixelMetric or QProxyStyle::pixelMetric implementaton. If you're >> using one of the standard styles then it's pretty simple to create and use a >> QProxyStyle class to tweak pixel metrics and other aspects of the style. >> >> If that doesn't work you may be able to reimplement >> Q[Proxy]Style::drawControl for element QStyle::CE_FocusFrame and handle the >> drawing of the focus frame itself. >> >> One thing to watch out for is that making QStyle::PM_FocusFrameHMargin and >> QStyle::PM_FocusFrameVMargin larger than default can result in the focus >> frame getting clipped in some situations. We see this using persistent >> editors in itemviews sometimes, and I think we also sometimes see this when >> certain widgets are in splitters. >> >> Adam > > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Qt Creator Application Output window
Maybe I was too specific here. This isn't just a problem with Address Sanitizer. It is a general problem with the output pane in Qt Creator. Its just that AddressSanitizer happens to put out lots of output. So I guess y'all don't see this? -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Qt Creator Application Output window
Using Qt Creator 4.11.1 on Mac OS 10.14.6 with an Address Sanitizer build of our application. As y'all may know, if you hit a problem in an Address Sanitizer build, the output from AS can be quite extensive. But very useful! Unfortunately, in the environment summarized above, the Application Output view in Qt Creator often fails to flush the output to the display, making it impossible to get all that useful information. See sample output copied from a recent run below. Looks like a buffering issue? 1) Is there a work-around? Some way to force the output to flush to the display? 2) Do others see this too? -John Weeks = ==2501==ERROR: AddressSanitizer: heap-use-after-free on address 0x60300112fe40 at pc 0x0001052ca5ac bp 0x7ffeefbfa430 sp 0x7ffeefbfa428 READ of size 8 at 0x60300112fe40 thread T0 2020-04-22 09:14:45.998305-0700 atos[2944:31382] examining /Users/USER/Documents/*/Igor64.app/Contents/MacOS/Igor64 [2501] 2020-04-22 09:14:46.168427-0700 atos[2945:31394] examining /Users/USER/Documents/*/Igor64.app/Contents/MacOS/Igor64 [2501] #0 0x1052ca5ab in GetRawWaveUnits(waveHdr**, int, char*, int) WaveUnits.cpp:203 #1 0x1052ca7d8 in GetWaveUnits(waveHdr**, int, char*, int) WaveUnits.cpp:263 #2 0x104538c2e in GetUnits(std::__1::shared_ptr, char*) axislabel.cpp:116 #3 0x1044ad071 in IsDateAxis(std::__1::shared_ptr) axis.cpp:6000 #4 0x104c0d95b in SetAxisInfo(grafRec*, std::__1::shared_ptr, int) plotdata.cpp:2559 #5 0x104c173a2 in UpdateGrafAxes(grafRec*, int) plotdata.cpp:2979 #6 0x104c1f714 in UpdateGraf(grafRec*) plotdata.cpp:3459 #7 0x104c2342c in DoUpdtDisplay(int) plotdata.cpp:3706 #8 0x104c22cb7 in UpdtDisplay(int) plotdata.cpp:3761 #9 0x1002190e1 in IgorAppObject::doIdleEvent(bool) IgorAppObject.cpp:4222 #10 0x100217a98 in IgorAppObject::timerEvent(QTimerEvent*) IgorAppObject.cpp:3704 #11 0x117dec5e5 in QObject::event(QEvent*) qobject.cpp:1228 #12 0x11752211a in QGuiApplication::event(QEvent*) (QtGui:x86_64+0x3011a) #13 0x116d08802 in QApplication::event(QEvent*) qapplication.cpp:2022 #14 0x100217474 in IgorAppObject::event(QEvent*) IgorAppObject.cpp:3697 #15 0x116d09fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) qapplication.cpp:3722 #16 0x116d0b347 in QApplication::notify(QObject*, QEvent*) qapplication.cpp #17 0x1001ff3ca in IgorAppObject::notify(QObject*, QEvent*) IgorAppObject.cpp:914 #18 0x117dc3563 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1024 #19 0x117e19313 in QTimerInfoList::activateTimers() qcoreapplication.h:233 #20 0x11f0fe261 in QCocoaEventDispatcherPrivate::activateTimersSourceCallback(void*) qcocoaeventdispatcher.mm:124 #21 0x7fff460bce32 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (CoreFoundation:x86_64h+0x57e32) #22 0x7fff460bcdd8 in __CFRunLoopDoSource0 (CoreFoundation:x86_64h+0x57dd8) #23 0x7fff460a079a in __CFRunLoopDoSources0 (CoreFoundation:x86_64h+0x3b79a) #24 0x7fff4609fd64 in __CFRunLoopRun (CoreFoundation:x86_64h+0x3ad64) #25 0x7fff4609f66d in CFRunLoopRunSpecific (CoreFoundation:x86_64h+0x3a66d) #26 0x7fff452fe1aa in RunCurrentEventLoopInMode (HIToolbox:x86_64+0xb1aa) #27 0x7fff452fdee4 in ReceiveNextEventCommon (HIToolbox:x86_64+0xaee4) #28 0x7fff452fdc75 in _BlockUntilNextEventMatchingListInModeWithFilter (HIToolbox:x86_64+0xac75) #29 0x7fff4369577c in _DPSNextEvent (AppKit:x86_64+0x1a77c) #30 0x7fff4369446a in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (AppKit:x86_64+0x1946a) #31 0x7fff ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Wrong position QStyleOptionProgressBar on macOS
Glad I could help! -John Weeks > On Mar 21, 2020, at 3:24 AM, Roman Wüger wrote: > > John, thank you very much, > > your solution worked as expected. > > Best Regards > Roma > >> Am 20.03.2020 um 20:46 schrieb John Weeks : >> >> Roman- >> >> Alot of QStyle code seems to think that all drawing will be done in a widget >> solely occupied by whatever it is that QStyle is drawing. I guess folks like >> you and me who try to use QStyle to get cross-platform control appearance >> for sub-rects of a widget aren't very common. >> >> I finally did this for QStyleProgressBar: >> QStyleOptionProgressBar options; >> painter->translate(r.left, r.top); >> options.rect.moveTo(0,0); >> >> A few QStyle things mess with the QPainter transformation matrix. In that >> case, the only thing I can find to work around the problems is to paint the >> QStyle object into a QImage or QPixmap, then draw that image wherever you >> need it. >> >> I have filed bugs against some of these problems, and gotten very little >> attention. >> >> -John Weeks >> >>> On Mar 20, 2020, at 12:02 PM, Roman Wüger wrote: >>> >>> Hello, >>> >>> I use QStyleOptionProgressBar on macOS Catalina with Qt 5.14.1 and tried >>> versions back to 5.11.3. >>> >>> In a Table the progressbar is always displayed in row 0 and column 0 which >>> is wrong even the current row is 6 or something like that and column is 1 >>> or similar. >>> >>> Any hints on this issue? >>> >>> Best Regards >>> Roman >>> ___ >>> 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] Wrong position QStyleOptionProgressBar on macOS
Roman- Alot of QStyle code seems to think that all drawing will be done in a widget solely occupied by whatever it is that QStyle is drawing. I guess folks like you and me who try to use QStyle to get cross-platform control appearance for sub-rects of a widget aren't very common. I finally did this for QStyleProgressBar: QStyleOptionProgressBar options; painter->translate(r.left, r.top); options.rect.moveTo(0,0); A few QStyle things mess with the QPainter transformation matrix. In that case, the only thing I can find to work around the problems is to paint the QStyle object into a QImage or QPixmap, then draw that image wherever you need it. I have filed bugs against some of these problems, and gotten very little attention. -John Weeks > On Mar 20, 2020, at 12:02 PM, Roman Wüger wrote: > > Hello, > > I use QStyleOptionProgressBar on macOS Catalina with Qt 5.14.1 and tried > versions back to 5.11.3. > > In a Table the progressbar is always displayed in row 0 and column 0 which is > wrong even the current row is 6 or something like that and column is 1 or > similar. > > Any hints on this issue? > > Best Regards > Roman > ___ > 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] Troubles with debugging
I still see it after a couple of Qt Creator updates. My colleague here is using a pretty old version of Creator because of this problem. So it seems like something Creator is doing. Googling _os_unfair_lock_recursive_abort or _os_unfair_lock_lock_slow doesn't yield much, except for bug reports on other applications. -John Weeks > On Feb 19, 2020, at 8:31 AM, Nils Jeisecke > wrote: > > Hi list, > > I'm seeing the same thing here. Not sure when troubles started. > Nobody else having problems with that? > > Nils > > Am 19.08.2019 um 11:37 hat John Weeks geschrieben: >> On Macintosh OS X 10.14.5, Qt 5.12.5, and Qt Creator 4.9.2 I keep getting a >> crash while stepping through code. I get a stack trace that looks something >> like this: >> >> 1 _os_unfair_lock_recursive_abort >> >> (x86_64) /usr/lib/system/libsystem_platform.dylib >> 0x7fff64dac1c2 >> 2 _os_unfair_lock_lock_slow >> >> (x86_64) /usr/lib/system/libsystem_platform.dylib >> 0x7fff64da8caa >> 3 look_up_class >> >> (x86_64h) /usr/lib/libobjc.A.dylib >> 0x7fff633e6774 >> 4 QMacAutoReleasePool::QMacAutoReleasePool() >> >> qcore_mac_objc.mm 169 0x111cd1dc5 >> 5 QMacAutoReleasePool::QMacAutoReleasePool() >> >> qcore_mac_objc.mm 140 0x111cd1ec5 >> 6 QMacStyle::styleHint(QStyle::StyleHint, QStyleOption const *, QWidget >> const *, QStyleHintReturn *) const >> qmacstyle_mac.mm 2602 >> 0x11c53c5e2 >> 7 QProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const *, QWidget >> const *, QStyleHintReturn *) const >>qproxystyle.cpp 290 0x10f7adea6 >> 8 IgorProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const *, >> QWidget const *, QStyleHintReturn *) const >> IgorProxyStyle.cpp250 >> 0x1002c2191 >> 9 QFocusFrame::setWidget(QWidget *) >> >> qfocusframe.cpp 187 0x10f830bba >> 10 QMacStyle::event(QEvent *) >> >> qmacstyle_mac.mm 6517 0x11c55e379 >> <.. Lots of other stuff removed here ...> >> >> Plain debug build, turned on the checkbox for loading the debug Qt >> frameworks. The styleHint and AutoReleasePool stuff seems to be a constant >> part of the problem. >> >> That bit at line 2 about "slow" suggests that OS X got tired of waiting for >> my stepping through the code and decided to abort. This makes it really hard >> to debug certain parts of the code. Is this anything that y'all have seen? >> Is there a solution? Do I just have to use QDebug() statements liberally >> sprinkled about my code to debug? >> >> Any insight greatly appreciated. >> >> -John Weeks >> >> ___ >> 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] Where does libGL get changed to absolute and how to stop?
On 11/15/19 10:05 AM, Marius Kittler wrote: As far as I know this is done within `defineTest(qtConfResolveLibs)` in `qtbase/mkspecs/features/qt_configure.prf`. Not sure how to disable this except from patching the function. I also needed to patch it for my mingw-w64 builds. Could you share your patch? Considering the code it seems to take `-L` flags into account. So maybe you can workaround the problem by using `-L` . Or just specify the full patch yourself. (I assume your problem is that the library is resolved to the wrong full path but using full paths in general would work.) I put in absolute paths for QMAKE_LIBS_OPENGL, and then at the end of configuration, my debug statements print out the correct value. However, this generates a file, qtbase/src/gui/qtgui-config.pri in which I find QMAKE_LIBS_OPENGL = /lib64/libGL.so and the build creates a largely redundant qtbase/mkspecs/modules-inst/qt_lib_gui_private.pri also containing the wrong information, and the build still links in the system /lib64/libGL.so. So then I comment out that line in qtbase/src/gui/qtgui-config.pri before starting the build. The second file, is now correct, and the build proceeds correctly. So it seems that it comes down to an incorrectly generated qtbase/src/gui/qtgui-config.pri, which I can fix post-facto, but I think there must be a better fix. Perhaps your patch? ThanksJohn Cary ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Where does libGL get changed to absolute and how to stop?
Trying to configure qt-5.12.5 to use mesagl, so I modified qtbase/mkspecs/linux-g++-64/qmake.conf to have QMAKE_LIBDIR_OPENGL = /scr_ivy/cary/contrib-gcc830/mesa-17.2.8-sersh/lib /scr_ivy/cary/contrib-gcc830/llvm-5.0.0-sersh/lib QMAKE_INCDIR_OPENGL = /scr_ivy/cary/contrib-gcc830/mesa-17.2.8-sersh/include QMAKE_LIBS_OPENGL += -lLLVM and early on, print shows Project MESSAGE: QMAKE_LIBS_OPENGL = -lGL -lLLVM But somewhere this gets changed to Project MESSAGE: AFter currentConfig = config.qtbase: QMAKE_LIBS_OPENGL = /lib64/libGL.so i.e., with a full path, and not to the path I specified with QMAKE_LIBDIR_OPENGL. Is there a way to stop this behavior? Where is the code that does this? ThxJohn Cary ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Q_NAMESPACE is not portable?
And I was taught in middle school that such a "for instance" should have commas before and after: "This is useful, for instance, if the object needs to be exported from a dynamic library." > On Aug 27, 2019, at 12:58 AM, Kai Köhne wrote: > > > >> -Original Message- >> From: Interest On Behalf Of Jason H >> Sent: Monday, August 26, 2019 10:33 PM >> To: Andy >> Cc: Qt Project >> Subject: Re: [Interest] Q_NAMESPACE is not portable? >> >> That's what I was attempting to point out. >> I think "for instance" should be written out in this case, or use an >> established >> abbreviation, or dropped entirely: > > I had the same thought > > https://codereview.qt-project.org/c/qt/qtbase/+/271615 > > Kai > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Troubles with debugging
On Macintosh OS X 10.14.5, Qt 5.12.5, and Qt Creator 4.9.2 I keep getting a crash while stepping through code. I get a stack trace that looks something like this: 1 _os_unfair_lock_recursive_abort (x86_64) /usr/lib/system/libsystem_platform.dylib 0x7fff64dac1c2 2 _os_unfair_lock_lock_slow (x86_64) /usr/lib/system/libsystem_platform.dylib 0x7fff64da8caa 3 look_up_class (x86_64h) /usr/lib/libobjc.A.dylib 0x7fff633e6774 4 QMacAutoReleasePool::QMacAutoReleasePool() qcore_mac_objc.mm 169 0x111cd1dc5 5 QMacAutoReleasePool::QMacAutoReleasePool() qcore_mac_objc.mm 140 0x111cd1ec5 6 QMacStyle::styleHint(QStyle::StyleHint, QStyleOption const *, QWidget const *, QStyleHintReturn *) const qmacstyle_mac.mm 2602 0x11c53c5e2 7 QProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const *, QWidget const *, QStyleHintReturn *) const qproxystyle.cpp 290 0x10f7adea6 8 IgorProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const *, QWidget const *, QStyleHintReturn *) const IgorProxyStyle.cpp250 0x1002c2191 9 QFocusFrame::setWidget(QWidget *) qfocusframe.cpp 187 0x10f830bba 10 QMacStyle::event(QEvent *) qmacstyle_mac.mm 6517 0x11c55e379 <.. Lots of other stuff removed here ...> Plain debug build, turned on the checkbox for loading the debug Qt frameworks. The styleHint and AutoReleasePool stuff seems to be a constant part of the problem. That bit at line 2 about "slow" suggests that OS X got tired of waiting for my stepping through the code and decided to abort. This makes it really hard to debug certain parts of the code. Is this anything that y'all have seen? Is there a solution? Do I just have to use QDebug() statements liberally sprinkled about my code to debug? Any insight greatly appreciated. -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Two different layouts?
Thank you! That might be what I want. I'll check it out on Monday. > On Aug 16, 2019, at 3:24 PM, Israel Brewster wrote: > > On Aug 14, 2019, at 1:06 PM, John Weeks wrote: >> >> I have a moderately complex window (more than 50 QWidget- and >> QLayout-derived components). I have decided that it would be nice to have >> two versions: a vertical layout and a horizontal layout. But it's not just a >> matter of QVBoxLayout vs QHBoxLayout. >> >> I have developed a new .ui file with the vertical layout and the appropriate >> rearrangement of the widgets. All the widgets are the same, with the same >> names. The QLayout-derived items are different, but my code doesn't need to >> access them. >> >> It would be great if I could instantiate one or the other of these layouts >> at run-time and get back a pointer (or something?) that I could use instead >> of the usual ui-> pointer. The members that I need to reference all have the >> same names in the two .ui files. Seems like there should be a C++ template >> way to do this, but I'm not as clever with that kind of stuff as I might be. >> >> Has anyone developed a solution to this? Or do I need to make a wrapper >> class that has an accessor function for each of the widgets? That would be a >> pain to implement, and a source of bugs in the future when I change the >> layouts. >> >> Any ideas greatly appreciated. >> >> -John Weeks >> > > It sounds like you may be looking for the QUiLoader Class > (https://doc.qt.io/qt-5/quiloader.html)? Create an empty QMainWindow (in > code), then at runtime in the constructor of said window load the proper UI > file using the QUILoader (what it loads is your ui-> pointer), and use the > setCentralWidget() method of the window to set the widgets from the UI file > into the window. I think that’s how it goes :-) > > --- > Israel Brewster > Software Engineer > Alaska Volcano Observatory > Geophysical Institute - UAF > 2156 Koyukuk Drive > Fairbanks AK 99775-7320 > Work: 907-474-5172 > cell: 907-328-9145 > >> ___ >> Interest mailing list >> Interest@qt-project.org >> https://lists.qt-project.org/listinfo/interest > -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] Two different layouts?
I have a moderately complex window (more than 50 QWidget- and QLayout-derived components). I have decided that it would be nice to have two versions: a vertical layout and a horizontal layout. But it's not just a matter of QVBoxLayout vs QHBoxLayout. I have developed a new .ui file with the vertical layout and the appropriate rearrangement of the widgets. All the widgets are the same, with the same names. The QLayout-derived items are different, but my code doesn't need to access them. It would be great if I could instantiate one or the other of these layouts at run-time and get back a pointer (or something?) that I could use instead of the usual ui-> pointer. The members that I need to reference all have the same names in the two .ui files. Seems like there should be a C++ template way to do this, but I'm not as clever with that kind of stuff as I might be. Has anyone developed a solution to this? Or do I need to make a wrapper class that has an accessor function for each of the widgets? That would be a pain to implement, and a source of bugs in the future when I change the layouts. Any ideas greatly appreciated. -John Weeks ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Qt free software policy
We are a small company selling a very large and complex application which is now based on Qt open source. At the time we first considered porting to Qt (version 4.3?) the license was very expensive for small company (six programmers) and the evaluation period simply wasn't adequate to deciding if it was the right way to go. So we went open-source when it became available when Nokia took over. Since then, we have wished that we had a commercial license in order to get a bit more traction on some bugs. The Qt Company wanted us to pay for all the licensing that had accrued since we started using the LGPL version. That up-front cost is prohibitive, so we haven't done it. Perhaps, if you are trying to nudge folks toward commercial licensing, you could provide a path that isn't so expensive. Or maybe you have? We haven't bothered to look into it lately. -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Finish QLineEdit editing when user clicks anywhere outside the QLineEdit
Ah. In our case, the QLineEdit is inside (and parented by) a widget that provides the background of the window. That parent widget can accept focus, so I guess our cases are not quite the same. > On Aug 14, 2019, at 9:35 AM, Murphy, Sean wrote: > >> I used the QLineEdit focusOutEvent() event. > > Can you elaborate on that? Because when I tested yesterday, if the user > clicks on something that does NOT grab focus (for example, any whitespace > that exists in the layout between widgets), the line edit never gets a > focusOutEvent(). > > I need it to work if the user clicks ANYWHERE outside the QLineEdit, and > there's no way for me to predict/guarantee what the user is going to click > on... > > Sean > > > This message has been scanned for malware by Forcepoint. www.forcepoint.com > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Finish QLineEdit editing when user clicks anywhere outside the QLineEdit
I used the QLineEdit focusOutEvent() event. > On Aug 13, 2019, at 1:21 PM, Murphy, Sean wrote: > >> Hmm, about that extra step, to remember the filter stuff, since you already >> have a custom line edit class, why not embed the MouseFilter class inside it? >> I mean, the filter does not have to reside in MainWindow, it needs only the >> qApp pointer, so you could wire it up in your custom line edit's ctor >> instead. >> Thus making it an integrated part of your custom class :-) > > Already planning on attempting that once I can get back around to this issue! > As often happens, something else is pulling my attention away at the > moment, but I'll give it a shot when I have time and report back. > > Sean > > > This message has been scanned for malware by Forcepoint. www.forcepoint.com > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest -John ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] Odd crash with QPainter + QOpenGLWidget
I can't really answer your exact question, but I can tell you that we render QPainter drawing (including text) onto a QOpenGLWidget this way (not the real code...): QOpenGLWidget::paintGL() { QPainter painter(this); painter->beginNativePainting(); do your OpenGL drawing here ... painter->endNativePainting(); ... do your QPainter drawing here ... return true; } But in fact, the part that says, "... do your QPainter drawing here ..." is actually done by creating an appropriately-sized QImage, doing the QPainter drawing in that, then drawing the QImage into the original QPainter. There is a comment in the code: // JW 161012 This next block is a work-around for what appears to be a Qt bug in drawing // text into a QOpenGLWidget that contains a texture (?). Text drawn here comes out sheared // in a strange way (you may be able to still see this in the drag image when dragging an // annotation). Details of the bug depend on the font and which characters are being drawn. My vague recollection is that we did it this way because using paintEvent() requires some slight of hand to sync the GL buffers. Maybe the crash is a result of something like that. -John Weeks > On Mar 27, 2019, at 2:48 PM, Matthew Woehlke wrote: > > I've cargo-culted some code to render text over a QOpenGLWidget from > another project: > > void MyWidget::paintEvent(QPaintEvent* event) > { >QOpenGLWidget::paintEvent(event); > >auto const& text = /* elided */; > >QPainter painter{this}; >painter.setPen(Qt::white); >painter.setFont(font()); >painter.drawText(rect(), Qt::AlignCenter, text); >painter.end(); > } > > In the "donor" project, this works fine, but the "recipient" project is > crashing on exit: > > ==12997== Invalid read of size 8 > ==12997==at 0x5D204E4: QObject::thread() const (qobject.cpp:1420) > ==12997==by 0x598A728: QOpenGLVertexArrayObjectPrivate::destroy() > (qopenglvertexarrayobject.cpp:212) > ==12997==by 0x598A9AA: > QOpenGLVertexArrayObject::~QOpenGLVertexArrayObject() > (qopenglvertexarrayobject.cpp:392) > ==12997==by 0x5987286: > QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache() > (qopengltextureglyphcache.cpp:87) > ==12997==by 0x59872AC: > QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache() > (qopengltextureglyphcache.cpp:93) > ==12997==by 0x576ADAB: ~QLinkedListNode (qlinkedlist.h:69) > ==12997==by 0x576ADAB: > QLinkedList::freeData(QLinkedListData*) > [clone .isra.119] (qlinkedlist.h:345) > ==12997==by 0x5BB10E8: QHashData::free_helper(void > (*)(QHashData::Node*)) (qhash.cpp:572) > ==12997==by 0x576A9BA: freeData (qhash.h:585) > ==12997==by 0x576A9BA: ~QHash (qhash.h:254) > ==12997==by 0x576A9BA: QFontEngine::~QFontEngine() (qfontengine.cpp:271) > ==12997==by 0x18C155FC: QFontEngineFT::~QFontEngineFT() > (qfontengine_ft.cpp:794) > ==12997==by 0x576AAE4: QFontEngineMulti::~QFontEngineMulti() > (qfontengine.cpp:1792) > ==12997==by 0x18C1E41C: > QFontEngineMultiFontConfig::~QFontEngineMultiFontConfig() > (qfontenginemultifontconfig.cpp:57) > ==12997==by 0x575F25E: QFontCache::clear() (qfont.cpp:2796) > ==12997== Address 0x8 is not stack'd, malloc'd or (recently) free'd > > Any ideas why? Is this a reasonable approach to rendering text in a > QOpenGLWidget, or is there a better way? (I am "fairly confident" that > the problem is the text rendering, above, since the crash goes away if I > comment out said code.) > > -- > Matthew > ___ > 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] Qt iOS / App Groups / NSUserDefaults initWithSuiteName / Not persisting (Nuno Santos)
> I feel stupid! :D Heh. You can join the elite group of, what, nearly 100% of coders who have had this experience? :) Those that haven't are probably not doing serious work. -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Calling QMainWindow::close() vs. clicking on close button in title bar
Our application needs to control how windows close pretty carefully- we handle QEvent::close by ignoring it, then doing whatever we feel like we need to do. That is, we take over management of the situation. -John Weeks WaveMetrics, Inc. > On Oct 30, 2018, at 5:53 AM, Andy wrote: > > Turns out that if you have a QMainWindow containing a QWindow (e.g. by using > QWidget::createWindowContainer()): > > - if you call QMainWindow::close(), the QWindow receives QEvent::Hide and > does the right thing > - if you click the close button in the title bar, the QWindow receives > QEvent::Close which calls QWindow::destroy() > > This is not what I would expect. Is this by design? > > The QWidget::createWindowContainer docs don't mention this as a limitation. > > I haven't yet found a way around it, so suggestions appreciated. > > --- > Andy Maloney // https://asmaloney.com > twitter ~ @asmaloney > > > On Tue, Oct 30, 2018 at 7:24 AM Andy wrote: > Setup: > > - two QMainWindows - "main" and "viewer" > - "viewer" uses Qt3D via QWidget::createWindowContainer() > - shortcut "cmd-w" (Qt::ApplicationShortcut) set up to call close() on > "viewer" if it is the activeWindow() > - "viewer" does not have WA_DeleteOnClose set, so the window is only hidden > > Problem: > > - if I close the viewer via the shortcut and reopen it, the 3D view is fine > - if I close it via the close button in the title bar (macOS or Windows) and > reopen it, the 3D view is blank > > Any idea why my 3D view is getting killed in the second case? > > This may be a red-herring, but I've traced both through to > QWidgetPrivate::close_helper() and each is called with a different mode. The > first is called with "CloseWithEvent" and the second with > "CloseWithSpontaneousEvent". Could this be a factor? > > I have another window which uses a QGraphicsView set up exactly the same way > and it works fine, so maybe Qt3D is doing something I'm not expecting based > on a CloseWithSpontaneousEvent? > > Thanks for any ideas/suggestions. > > --- > Andy Maloney // https://asmaloney.com > twitter ~ @asmaloney > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -John ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Find frontmost widget of specific type?
We faced pretty much exactly this issue when we ported our very large application to Qt, starting with Qt 4.8. We have many places where we expect to be able to walk a window list in Z order. I wound up using Activate/Deactivate events to keep the list myself. I can't really recommend it- it has been pretty much of a nightmare to make it robust and bug-free, especially as Qt has a couple of bugs in their own notion of window activation. You can't really use the debugger to debug these issues, as the activation of the debugger changes the activation of the application's windows. I have made it work pretty well, but I quake in my boots whenever I get a bug report about window order. We are now using Qt 5.9 and don't have any sort of replacement for my delicate and difficult code. -John Weeks WaveMetrics, Inc. > On Oct 22, 2018, at 11:37 AM, Israel Brewster wrote: > > I have an application (Qt 5.9) that has a variety of different types of > windows you can open. If a user selects to open a type of window that is > already open, I want to position the new window relative to the existing > one. I can easily find any existing windows of a given type by going through > the list of widgets in QApplication::allWidgets(), doing a qobject_cast to > the proper type, and checking the result, but is there a way to determine > which of these is the frontmost of that type? QApplication::ActiveWindow() > doesn't help, because the activeWindow may not be of that type. > > --- > Israel Brewster > Systems Analyst II > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7293 > --- > > > > > > > > > > > > > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Can't debug on Android device anymore
Yes. My recollection is that it happened when I upgraded Xcode and the Xcode command line tools. I think I resolved it by shutting down Creator, trashing the built application bundle and the build folders. You might even want to restart your computer. It's also possible that all that is a red herring and that I solved it accidentally in some way that I can't recall :) -John Weeks > On Jun 11, 2018, at 6:56 AM, René Hansen wrote: > > Hi, > > > Has anyone else starting seeing this error, when trying to run in debug mode > on device? > > "Can't find C++ debugger." > > It seems to have started just recently and I haven't made any changes to my > ndk afaict. > > QtCreator 4.6.2 on macOS. > > > /René > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Singleton application
We derive our application from QtSingleApplication (it derives from QApplication). We acquired the code some time ago, no doubt URLs have changed since then... We are presently using Qt 5.9.5. I had compile errors when I first downloaded it, described in https://bugreports.qt.io/browse/QTSOLBUG-171. I see this in my bug report: I cloned it from http://qt.gitorious.org/qt-solutions August 6, 2013. Five years later it's still working for us. -John Weeks > On Apr 17, 2018, at 5:26 AM, Samuel Gaist <samuel.ga...@edeltech.ch> wrote: > > >> On 17 Apr 2018, at 12:33, Hamish Moffatt <ham...@risingsoftware.com> wrote: >> >> Is there any support built-in for making an application a singleton (ie you >> can't launch multiple instances), or does anyone have a recipe? >> >> I'd actually like a second launch to signal the first, passing on any >> parameters, much like the web browsers do. (eg link clicked from an >> application creates new tab in existing browser instance.). >> >> I need this to work on Windows and Mac. >> >> >> Hamish >> >> ___ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > > Hi, > > Just in case, the qtsolution module is available at > http://code.qt.io/cgit/qt-solutions/qt-solutions.git/ with build fixes for Qt > 5. > > The QtSingleApplication module is working with Qt 5. However it doesn’t > provide support for QGuiApplication but it’s not hard to add it if needed. > > Cheers > Samuel > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] High-dpi fixing for Qt 5.5
Do it in the showEvent()? > On Mar 2, 2018, at 8:16 AM, Elvis Stansvikwrote: > > 2018-03-02 16:26 GMT+01:00 Martins, Sérgio : >> On 2018-03-02 15:21, Elvis Stansvik wrote: >>> >>> 2018-03-02 16:18 GMT+01:00 Elvis Stansvik : 2018-03-02 15:54 GMT+01:00 Nikos Chantziaras : > > On 02/03/18 16:37, Elvis Stansvik wrote: >> >> >> [...] >> How can I (as application developer) get notified of screen changes of >> non-QWindow-backed widgets? > > > > There seems to be two ways to do this. One is using one of the QScreen > signals: > > http://doc.qt.io/qt-5/qscreen.html Hm, I should have made my question more clear. The typical way I've seen is to connect to the screenChanged signal of the closest ancestral QWindow (window()->windowHandle()). But, I've found that it's not reliable for certain widgets/certain platforms to do e.g: QTimer::singleShot(0, [this]() { connect(window()->windowHandle(), ::screenChanged, this, ::handleScreenChanged); }); in my constructor, because depending on how the widget is constructed, the parentage up to a top-level window may not have been established yet, even if I do it in a single-shot timer like this. >>> >>> >>> I should clarify this: What I mean is that I've seen situations when >>> window()->windowHandle() is 0 here, even if the widget is constructed >>> with a full parentage up to a top-level widget. >> >> >> Hi, >> >> Call QWidget::create() on your top-level constructor, and it will ensure it >> it has a QWindow > > Thanks, that's one way of doing it, but reading further, it seems > QWidget delays doing this for a reason. E.g. see the docs for > Qt::AA_ImmediateWidgetCreation, which I could also use to tell Qt to > call create(..) immediately during construction. That attribute is due > to be removed in Qt 6 though. > > I don't think I like the idea of jumping the gun on QWidget here and > calling create(..) myself. > > Surely there must be some way to reliably know when a widget is moved > to another screen (or anoter top-level window), short of hooking up to > internal events? > > Elvis > >> >> >> Regards, >> -- >> Sérgio Martins | sergio.mart...@kdab.com | Senior Software Engineer >> Klarälvdalens Datakonsult AB, a KDAB Group company >> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) >> KDAB - The Qt, C++ and OpenGL Experts > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -Johnm Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] SVG Full
QSvgRenderer implements SVG Tiny 1.2, which means that it can't reliably render Inkscape drawings. I have just had a query from a customer about this. The advice for rendering SVG Full is to use QtWebKit. This seems like using a sledgehammer to drive finishing nails. Is there a way to do this? Might QSvgRenderer one day implement SVG Full? Thanks for any insights. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt Charts questions
That can really distort the shape of a curve in often misleading ways. And if the sensors can be truly zero, you have another, bigger problem. > On Jan 4, 2018, at 2:11 PM, william.croc...@analog.com wrote: > > Use a single, logarithmic Y axis. > (I have never use Qt Charts so I do not know if they support logarithmic > axes.) -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QDockWidgets: how to get regular windows in detached (floating) mode?
You may need to call setVisible(true). IIRC, changing window flags makes the widget invisible. -John Weeks > On Oct 11, 2017, at 2:36 PM, René J.V. Bertin <rjvber...@gmail.com> wrote: > > Hi, > > Dock widgets are very useful, but there are cases where I'd like to be able > to detach them to a regular window, because > > - regular windows stay visible when the application focus changes > - regular windows can do stacking > - regular windows can be put (partly) off the screen > > The latter 2 are practical when using a smaller screen size, all three are > useful for, say, a documentation browser. > > How can one achieve this? I see that QDockWidget::setFloating(true) > ultimately just sets the Qt::Tool window flag, so I tried unsetting that. At > the moment, I have > >connect(this, ::topLevelChanged, this, [this] (bool floating) { >if (floating) { >setTitleBarWidget(0); >setWindowFlags(Qt::Window); >updateGeometry(); >activateWindow(); >raise(); >} >} ); > > which probably has a number of redundant calls, doesn't handle the case when > a QDockWidget is created in "floating" mode and also isn't reliable. > > Most of the time, the window simply disappears when the above lambda is > triggered. In addition, under X11 the window will have the regular titlebar > provided by the WM but looks as if there's a regular window with the floating > dock window inside, tiny titlebar included. > > What am I missing here? > > Thanks, > René > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Building Qt 5.9.1 Expanded Path Too Long
>> Drop the -silent argument to configure. Thanks, that fixed the issue. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Building Qt 5.9.1 Expanded Path Too Long
3rdparty\harfbuzz\src -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\md5 -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\md4 -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\sha3 -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\double-conversion\include -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\double-conversion\include\double-conversion -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\include -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\include\QtCore -I..\..\include -I..\..\include\QtCore -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\include\QtCore\5.9.1 -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\include\QtCore\5.9.1\QtCore -I..\..\include\QtCore\5.9.1 -I..\..\include\QtCore\5.9.1\QtCore -Itmp -I.moc\release -ID:\Sources\gdb\32\zlib\include -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\src\3rdparty\pcre2\src -IC:\qt-everywhere-opensource-src-5.9.1\qtbase\mkspecs\win32-msvc -Fo.obj\release\ @C:\Users\JSCHNE~1\AppData\Local\Temp\nmA28C.tmp' too long Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. Thanks, John Schneiderman Senior Software Engineer Galaxy Desktop Team GOG.com ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Windows 5.9 Build System Library Failures
I’ve attached the config.log file. John Schneiderman Senior Software Engineer Galaxy Desktop Team GOG.com From: Thiago Macieira Sent: poniedziałek, 10 lipca 2017 23:19 To: interest@qt-project.org Subject: Re: [Interest] Windows 5.9 Build System Library Failures On segunda-feira, 10 de julho de 2017 04:28:31 PDT John Schneiderman wrote: > I’m trying to build the latest Qt 5.9 on Windows using Visual Studio 2015. > However, I’m having issues getting it to recognise the libraries already > built. Below is the results of the configuration command. [cut] > ERROR: Feature 'c++14' was enabled, but the pre-condition 'features.c++11 && > tests.c++14' failed. > > ERROR: Feature 'system-zlib' was enabled, but the pre-condition 'libs.zlib' > failed. > > ERROR: Feature 'system-sqlite' was enabled, but the pre-condition > 'features.sql-sqlite && libs.sqlite3' failed. > --c++std c++14 ^ MSVC 2015 does not support C++14, so please remove this option. With Visual Studio you ALWAYS get __cplusplus defined to 199711L, so the configure test fails. That's even with MSVC 2017. You also get NO C++14 features in Qt like the relaxed constepr, regardless of what Microsoft tells you. Please report an issue with them and ask them to support the SD-6 macros. I'm serious, please report it because they need the user pressure. As for the other issues, it should be working. Can you attach the config.log that configure generated? It will tell what it tried to find and failed. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest config.log Description: Binary data ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] WindowStaysOnTopHint on Windows always on top?
We have a QWidgets application that uses WindowStaysOnTopHint for certain windows. My expectation is that when the application isn't the active application, the floating windows should not be visible. But in our application they are visible always. Is this expected? Maybe I should file a bug on this behavior. Qt 5.6.3 Windows 10 -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Windows 5.9 Build System Library Failures
IES_RELEASE%" ^ -proprietary-codecs ^ -mp ^ -platform win32-msvc if %errorlevel% NEQ 0 goto Failed nmake if %errorlevel% NEQ 0 goto Failed nmake docs if %errorlevel% NEQ 0 goto Failed nmake install if %errorlevel% NEQ 0 goto Failed nmake install_docs if %errorlevel% NEQ 0 goto Failed popd rmdir /s /q %QT_SRC_BUILD_DIR% rmdir /s /q %QT_SRC_DIR% exit 0 :MissingArgument echo Missing expected arguments. echo. pause exit 1 :Failed echo Failed to build. Error Code: %errorlevel% 1>&2 echo. popd pause exit 2 === Any assistance in fixing these errors would be greatly appreciated as I’ve hit a brick wall on this. I’ve confirmed the paths to the libraries are correct, both name and directory. Thanks, John Schneiderman Senior Software Engineer Galaxy Desktop Team GOG.com ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QPainter draws text quads counterclockwise and other primitives clockwise
Using Qt 5.6.0 on Windows 10. QPainter draws the quads for text bitmaps counterclockwise, while primitives like ellipses and the quads for QPixmap draw clockwise. Result found on QOpenGLWidget. Is this intentional? Ex: I want to draw a 3D scene and then try to draw a framerate counter on top of it with QPainter's text functionality. Justification: *According to glCullFace, OpenGL face culling defaults to culling the back face, so front faces are shown but back faces are not. *According to glFrontFace, OpenGL defines a "front face" as counterclockwise polygons. *Therefore, if face culling is enabled in an OpenGL-running widget, it will default to culling clockwise (back face) polygons and anything that uses them. Demonstration code: See the example "2D Painting Example" in Qt Creator (I'm running Qt 5.6.0). This example uses a QPainter object to draw text and rotating ellipses on a QOpenGLWidget. 1. Add override of initializeGL() to GLwidget. 2. In source file, add function: #include void GLWidget::initializeGL() { QOpenGLFunctions_2_1 *f = QOpenGLContext::currentContext()->versionFunctions(); f->glEnable(GL_CULL_FACE); //f->glCullFace(GL_FRONT); // uncomment to cull the text and show the rotating elipses } 3. Run the program. The text "Qt" draws but the ellipses don't. Uncomment glCullFace(GL_FRONT) to reverse the effect and show the ellipses but not the text. 4. Now try drawing a pixmap after culling is turned on. The following won't draw if culling is turned on and it is culling back faces (clockwise polygons). #include void GLWidget::paintGL() { QPixmap p(myImageFilePath); QPainter painter(this); painter.drawPixmap(0, 0, p.scaled(this->size()); } 5. To draw a QPixmap when back faces are being culled, you have to do this: void GLWidget::paintGL() { QPixmap p(myImageFilePath); QOpenGLFunctions_2_1 *f = QOpenGLContext::currentContext()->versionFunctions(); GLBoolean faceCullingIsOn; // save current culling state f->glGetBooleanv(GL_CULL_FACE, ); f->glDisable(GL_CULL_FACE); QPainter painter(this); painter.drawPixmap(0, 0, p.scaled(this->size()); if (faceCullingIsOn == GL_TRUE) { // turn it back on f->glEnable(GL_CULL_FACE); } } Bug or intentional? This isn't a show-stopper for me but it did cause some grief. -John Cox ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] What don't you like about Qt?
OK, thanks Thiago, it seems we do understand each other. And it also seems that I am indeed venting my frustrations in an inappropriate forum (as you pointed out that this list is related to the open source project). Sorry about that. You did mention though that The Qt Company has SLAs and will try to reproduce problems etc., but what if I just want to say things like "I want this feature" or "I don't think this feature is implemented in the best way" or "I think the whole SDLC is being managed in a way that is ineffective and is making using Qt in a production environment difficult" or "mobile support is nowhere near good enough to implement serious apps so I can't use Qt as a true cross platform toolkit" or "QML is a great concept but without adequate C++ APIs, it's really only suitable for basic forms"? What SLAs or kinds of responses should I expect then? > On 5 Oct. 2016, at 18:07, Thiago Macieira <thiago.macie...@intel.com> wrote: > > Em quarta-feira, 5 de outubro de 2016, às 10:33:37 CEST, John C. Turnbull > escreveu: >> Thiago, it seems you have taken my comments as a personal attack on you and >> you have responded (naturally) in a defensive way. >> >> Well, I tried to make it very clear from my opening sentence that this was >> *not* a personal attack on you (or anyone else for that matter). In fact, I >> *thought* I made it obvious how much I am aware and appreciative of your >> own massive and positive contributions to Qt in general. > > Hello John, > > That was not the intention. I did not understand it as a personal attack nor > did I mean to attack you for saying it either. I totally understand your > position and I hope you understand my frankness. > >> But I think the key point here that perhaps you are missing is that for me >> and I suspect for many "customers", Qt is a commercial product and a >> support contract that we pay for. I see the entity that I am paying that >> money to as "The Qt Company". Whether or not the Qt *project* is "open >> source" is neither here nor there in the context of one business paying >> another for a product and support. > > Indeed, you may feel that, but that discussion is between you and The Qt > Company, maybe between you and a consulting company you may have hired for a > project. I am not in that discussion and cannot comment about it. > > But the bug reports in https://bugreports.qt.io are part of the Qt Project, > the open source side of it (just like this mailing list, actually). If you > report issues via the professional support contract, you get a different > person, dedicated to commercial customers, to look into your issue. They have > an SLA to respond to all your queries within a certain amount of time. They > also do try to reproduce your problem and come up with testcases. > > As an open source developer, I only see the resulting testcase. That helps me > greatly, because the testcase is something I can almost immediately run, > confirm the issue, and fix, all within a couple of hours. Or I can confirm > it's > not a bug and close the issue. Now, I can't confirm the other Qt modules have > the same success story, I can only speak for myself and my modules. > >> So, please, understand that I am not in any way even trying to be critical >> of *you* and, on the contrary, I'm actually singing your praises! > > No offence taken, don't worry. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] What don't you like about Qt?
Thiago, it seems you have taken my comments as a personal attack on you and you have responded (naturally) in a defensive way. Well, I tried to make it very clear from my opening sentence that this was *not* a personal attack on you (or anyone else for that matter). In fact, I *thought* I made it obvious how much I am aware and appreciative of your own massive and positive contributions to Qt in general. So, if I failed in my communication skills and caused you to feel "attacked" then I am sorry. But please know, that was most definitely not my intention. The remainder of your comments are, as I also said before, most likely absolutely "spot on" in terms of their level of accuracy. But I think the key point here that perhaps you are missing is that for me and I suspect for many "customers", Qt is a commercial product and a support contract that we pay for. I see the entity that I am paying that money to as "The Qt Company". Whether or not the Qt *project* is "open source" is neither here nor there in the context of one business paying another for a product and support. So, your extensive commentary on the ins and outs of maintaining an open source project are probably very relevant in that context and I am sure you know far more about those kind of matters than most (including me). Further, your motivations for contributing your time and expertise to this project are indeed honourable and, I have never suggested anything else. So, please, understand that I am not in any way even trying to be critical of *you* and, on the contrary, I'm actually singing your praises! I think we at crossed paths here and perhaps this is not the appropriate forum for me to put forward the comments I am making. If that's the case then, again, I am sorry and please direct me to a more appropriate forum. To summarise, I am speaking from the perspective of a paying customer of a commercial entity. And I suspect I am not the only one. > On 5 Oct. 2016, at 10:09, Thiago Macieira <thiago.macie...@intel.com> wrote: > > Em quarta-feira, 5 de outubro de 2016, às 08:13:38 CEST, John C. Turnbull > escreveu: >> Thiago, with all due respect, and I'm very aware of the significant >> contribution you personally have made to both the Qt product and the >> community, there is clearly a high degree of dissatisfaction with various >> aspects of Qt and the management of the SDLC. > > What's SDLC? Software Development Life Cycle? > > The Qt Project actually has a very good cycle for an Open Source project. > It's > certainly of much higher quality and stricter standards than 95%+ of other > open source software out there. I can tell you that we run more unit tests a > day than the Linux kernel does in a month (or maybe a year). > >> Your comments may be accurate but I'm not sure they have appeased many of >> the disgruntled customers. > > That may be, but facts and truth often don't serve to appease people. They're > more often than not a harsh reality. > > I could have stayed silent, though, like I've done with the rest of this > thread. > >> My advice (for what it's worth) would be to not ignore the swelling >> negativity that is building amongst paying customers and to see that there >> are some very genuine concerns out there that are making the task of >> putting food on the table more difficult than it need be for some people. > > I'm not ignoring the negativity and I doubt anyone is. But people who > complain > often have trouble putting their issues in the context of everything else > that > is going on. > > Also, I don't have any customers. I don't receive a penny, directly or > indirectly, of licensing fees or support contracts. Other people and other > companies involved may have a financial incentive. I don't. All I care are > the > Open Source principles and the technical quality. > >> It is troubling that you say that often developers simply don't *know* how >> to fix bugs. That does not engender a high degree of confidence in >> customers who have focused their entire business strategic plans on such a >> product. > > Again, that may be, but what would you rather I said? That developers are > magic geniuses that can fix anything, with little information, in no time at > all and twice on Sundays? C'mon, we're all limited, no one is perfect. > > But note I wasn't saying either that the developers are stupid. Far from it. > The most likely cause of not knowing how to fix is that the bug report is > incomplete or the issue is not reproducible. I had one recently that attached > a very nice testcase, with even a shell script that ran everything and set up > properly. And yet, after running for several hours, I
Re: [Interest] What don't you like about Qt?
Thiago, with all due respect, and I'm very aware of the significant contribution you personally have made to both the Qt product and the community, there is clearly a high degree of dissatisfaction with various aspects of Qt and the management of the SDLC. Your comments may be accurate but I'm not sure they have appeased many of the disgruntled customers. My advice (for what it's worth) would be to not ignore the swelling negativity that is building amongst paying customers and to see that there are some very genuine concerns out there that are making the task of putting food on the table more difficult than it need be for some people. It is troubling that you say that often developers simply don't *know* how to fix bugs. That does not engender a high degree of confidence in customers who have focused their entire business strategic plans on such a product. Further, appearing to be somewhat dismissive of the constructive criticism regarding the absence of Agile methodologies within the Qt processes and basically saying "that's the way it is", again, may not be seen as helpful by some customers. You know the old saying "If it ain't broke, don't fix it". Well, sadly, it *is* "broke". And even though I personally don't know how, its way past time to "fix it". > On 5 Oct. 2016, at 07:37, Thiago Macieirawrote: > >> Em terça-feira, 4 de outubro de 2016, às 16:03:00 CEST, Jason H escreveu: >> I think the bigger issue, that many people have expressed here, but not said >> as such, is the Qt release cycle is not Agile. > > It's as fast as it can be. We can't release faster than it is because the > steps just take too long. > >> what it's users want or need. Sometimes though, it's not even so much that >> we need release, we just need a patch to hold us over to the next release. > > All bug reports, when fixed, have a link to the actual change in > codereview.qt- > project.org, which contain the patch and the SHA-1 of the Git commit. So you > *do* have the patch. > >> My Agile team does two week sprints so we can reorder priorities twice a >> month. > > It takes us three weeks to create source and binary packages, then test them > for sanity, before we release. > >> The Qt community has no say (AFAIK) in determining the priority >> status, or what is worked on when. > > Priority is determined on facts, not on popularity. If you have more facts, > provide them. If you can show that a lot of applications are affected by the > bug, it gains in priority. > > That said, the most common issue for bugs not getting fixed is that the > developers couldn't figure out how. Voting won't change that fact. > >> I think the incorporation of a regular search of that nature would immensely >> improve the product. I don't think there is any transparency in the >> selected for fix criteria? > > There isn't, because developer selects the bugs they're going to fix. There's > common procedure. > > My procedure is: I'll fix everything that is assigned to me, the moment it's > assigned, if I can. If I couldn't within one day, I won't be able to until > there's more information posted. > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] What don't you like about Qt?
It's ironic in a way that every major graphical toolkit (and with many large software projects in general) that I've worked with over decades now, the attitude has commonly seemed to have been that "new" is better than "stable". The end result is a product full of both older and newer unstable features. Then credibility and reputation both take a major hit and for serious production users, frustration overwhelms them as they wait for features they have been using and investing years of effort/time/money into to simply work without major defects. More often than not though, if these features are not part of the "new shiny strategy", they tend to just rot... > On 3 Oct. 2016, at 18:14, Bernhard Lindner> wrote: > > 1. New features (quantity) are priorized over bug fixing (quality). > Suggestions > are almost sensless. I reduced writing bug reports and totally gave up > writing > suggestions due to this. > > 2. Widgets have too low priority. In general new fancy features are priorized > above bread-and-butter features from my point of view. > > 3. Components have been declared outdated while the replacements did not > provide the same feature set. This seriously damages Qt's reputation. > >> It's not unusual for us developers and contributors to lose >> perspective of what's important. >> After many years spent on very particular implementation details, it >> becomes difficult to see outside of the box. >> >> And because we already know the good aspects I'm asking only about the bad. >> No need to discuss or reach an agreement, just go ahead and enumerate >> what you don't like. > > -- > Regards, Bernhard > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QAudioDecoder mp3 problem
> On Aug 31, 2016, at 1:28 AM, Alexander Dyagilev <alervd...@gmail.com> wrote: > > Hello, > > I'm trying to decode an mp3 file. Getting ServiceMissingError ("The > QAudioDecoder object does not have a valid service"). > > At the same time QMediaPlayer can play the file. > > Am I doing something wrong? > > The code: > > QSharedPointer decoder(new QAudioDecoder()); > > decoder->setSourceFilename("1.mp3"); > > decoder->start(); On what platform? QAudioDecoder depends on both support on the platform and on the presence of a Qt plug-in that uses the platform support. The support on OS X is so minimal that we wound up writing a platform-specific bit of code using Core Audio (which is not pleasant!). It's also hard to figure what support is actually available on a given platform, and now I've forgotten how I figured it out! -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] debugger thread display
I'm working on a Macintosh running OS X 10.11.4, using Qt Creator 3.6.0. I have been trying to debug a crash in threaded code, but Qt Creator (or my debugger? It's lldb) won't cooperate fully. When the crash occurs, I see the stack trace for the crashed thread. I can choose another thread from the Threads menu, and I see the locals and expressions view change, but the stack trace remains showing the crashed thread. Do I simply need to get a newer Qt Creator? Or is there something I need to do differently? Thanks for any insight. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Design Issue with QAbstractItemModel & QTreeView
> When you say "packaging", you mean that you have a wrapper around the > underlying data (something like a TreeItem class that "caches" data)? I mean preparing the presentation of the data. > Main issue is not on adding rows (this you can indeed call begin while data > is already added), issue is on removal since beginRemoveRows needs to access > to the to-be-removed row, which is an issue if row has already been removed Why does removing a row require access to the (now gone) data? I believe one the main things that the beginXXX and endXXX functions do is to tell the view that it should not update while you work on revising the model. I'm not really sure how I got into being an "expert" on this. I'm not really :] -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Design Issue with QAbstractItemModel & QTreeView
> But when childAdded is called… child already has been added. That's the > issue, model is not manipulating data, it's just supposed to react on their > changes OK, I finally decided to look at our code and the documentation :) QAbstractItemModel has protected functions beginInsertRows and endInsertRows, as well as a few other beginXxx and endXxx functions. When data is added to the underlying data set, you call beginInsertRows(), do your work of packaging up QModelIndexes and inserting them, then call endInsertRows(). Since your subclass of QAbstractItemModel is only a representation of the data, not the data itself, you don't care of the childAdded signal comes after a data item has been added. At that point you prepare a new row in your QAbstractItemModel subclass. Where does your data come from? How do you know when new data is added to the underlying data set? -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Design Issue with QAbstractItemModel & QTreeView
> On Aug 4, 2016, at 2:19 PM, Sébastien Le Ray <sebastien...@orniz.org> wrote: > > That's what I do, but the signal says childAdded, where model needs > childWillBeAdded and childHasBeenAdded to handle > beginInsertRows/endInsertRows, same for the removal so that's not working. > Worst case is for the removal, since beforeRemoveRows triggers accesses to > the to-be-removed rows you can run into serious issues if the child has been > delete'd If I recall correctly, you would respond to childAdded by first calling childWillBeAdded, doing the work of adding the child, then calling childHasBeenAdded. The WillBe and HasBeen functions are used to inform the base class of what your code is doing. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Relationship between a QEventLoop and QCoreApplication::exec().
> On Aug 4, 2016, at 10:04 AM, Thiago Macieira <thiago.macie...@intel.com> > wrote: > > Starting an event loop from inside another event loop. > > exec() → some slot or event handler → exec() OK, so that would cover any use of QEventLoop::exec() in the main thread. It would also seem to cover any use of QDialog::exec() in the main thread, and QDialog can be used only in the main thread. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Relationship between a QEventLoop and QCoreApplication::exec().
At the risk of displaying my ignorance... Having followed this thread with great interest, I have come to the conclusion that perhaps I'm not really certain what you mean by "nested". Any chance of an example? > On Aug 3, 2016, at 10:31 PM, Thiago Macieira <thiago.macie...@intel.com> > wrote: > > I disagree. You should try to split. Lambdas might help. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest Lambdas have always seemed like a great way to write large blocks of obscure code, but it seems like I'm missing something. Another example? -John ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Thanks very much Sze - they all look very helpful. Qt is awesome. But it can be "awesomer" ;-) > On 12 Jul 2016, at 19:41, Sze Howe Koh <szehowe@gmail.com> wrote: > >> On 12 July 2016 at 14:53, John C. Turnbull <ozem...@ozemail.com.au> wrote: >> Thanks. I never thought of using Google ;-) >> >> Sadly Google shows me what *they* want me to see, not necessarily what I am >> actually looking for. >> >> Hence asking the question here: amongst a group of Qt experts who are not >> controlled by revenue-generating curating algorithms and who could point me >> to the most appropriate articles for my questions. >> >> Thanks for the links. I will check them out and hopefully they will give me >> the info I seek. >> >> -jct >> >>> On 12 Jul 2016, at 16:38, Mitch Curtis <mitch.cur...@qt.io> wrote: >>> >>> Have you tried Google? :D These two links probably cover your first two >>> questions: >>> >>> http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html >>> http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph-renderer.html >>> >>> >>>> -Original Message- >>>> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org] >>>> On Behalf Of John C. Turnbull >>>> Sent: Tuesday, 12 July 2016 4:06 AM >>>> To: Uwe Rathmann <uwe.rathm...@tigertal.de> >>>> Cc: interest@qt-project.org >>>> Subject: Re: [Interest] Utilizing the GPU, how to start? >>>> >>>> Anyone? >>>> >>>>>> On 10 Jul 2016, at 23:23, John C. Turnbull <ozem...@ozemail.com.au> >>>>> wrote: >>>>> >>>>> I am still new to Qt but am very interested in the technology and the >>>> deep innards of how it functions. I have worked in a 3D animation studio >>>> and learned a lot while I was there. >>>>> >>>>> Is there documentation or articles that: >>>>> >>>>> 1) Describe in detail how the Qt Quick rendering pipeline is designed >>>> and how it operates. >>>>> >>>>> 2) Describe the structure and overall architecture of the Qt Quick >>>> Scenegraph and how it is rendered? >>>>> >>>>> 3) Describe the steps that have been taken so far and any further steps >>>> planned to optimise both (1) and (2)? >>>>> >>>>> I really want to know how all this hangs together as I may be able to >>>> further optimise and improve aspects of them. >>>>> >>>>> -jct > > Hi John, > > In addition to Mitch's links, these might also interest you as you > mentioned experience in a 3D animation studio: > * http://doc.qt.io/qt-5/qt3d-overview.html > * http://doc.qt.io/qt-5/qt3drender-framegraph.html > > As for optimizations for Qt Quick, I think the Qt Company staff > members involved are in the best position to provide you with the > relevant info. Note that it is currently summer holidays in Norway, so > most of the staff are on leave till the end of July. Here's a small > peek at some of their recent work (although these are components built > on top of Qt Quick, rather than Qt Quick itself): > * http://blog.qt.io/blog/2015/03/31/qt-quick-controls-for-embedded/ > > > Regards, > Sze-Howe ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
It's OK - they "do no evil" ;-) > On 12 Jul 2016, at 17:01, alexander golks <a...@golks.de> wrote: > > Am Tue, 12 Jul 2016 16:53:25 +1000 > schrieb "John C. Turnbull" <ozem...@ozemail.com.au>: > >> Thanks. I never thought of using Google ;-) >> >> Sadly Google shows me what *they* want me to see, not necessarily what I am >> actually looking for. >> >> Hence asking the question here: amongst a group of Qt experts who are not >> controlled by revenue-generating curating algorithms and who could point me >> to the most appropriate articles for my questions. > > pssst they are listening > >> Thanks for the links. I will check them out and hopefully they will give me >> the info I seek. >> >> -jct >> >>> On 12 Jul 2016, at 16:38, Mitch Curtis <mitch.cur...@qt.io> wrote: >>> >>> Have you tried Google? :D These two links probably cover your first two >>> questions: >>> >>> http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html >>> http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph-renderer.html >>> >>> >>>> -Original Message- >>>> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org] >>>> On Behalf Of John C. Turnbull >>>> Sent: Tuesday, 12 July 2016 4:06 AM >>>> To: Uwe Rathmann <uwe.rathm...@tigertal.de> >>>> Cc: interest@qt-project.org >>>> Subject: Re: [Interest] Utilizing the GPU, how to start? >>>> >>>> Anyone? >>>> >>>>>> On 10 Jul 2016, at 23:23, John C. Turnbull <ozem...@ozemail.com.au> >>>>> wrote: >>>>> >>>>> I am still new to Qt but am very interested in the technology and the >>>> deep innards of how it functions. I have worked in a 3D animation studio >>>> and learned a lot while I was there. >>>>> >>>>> Is there documentation or articles that: >>>>> >>>>> 1) Describe in detail how the Qt Quick rendering pipeline is designed >>>> and how it operates. >>>>> >>>>> 2) Describe the structure and overall architecture of the Qt Quick >>>> Scenegraph and how it is rendered? >>>>> >>>>> 3) Describe the steps that have been taken so far and any further steps >>>> planned to optimise both (1) and (2)? >>>>> >>>>> I really want to know how all this hangs together as I may be able to >>>> further optimise and improve aspects of them. >>>>> >>>>> -jct >> >> ___ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > > -- > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Thanks. I never thought of using Google ;-) Sadly Google shows me what *they* want me to see, not necessarily what I am actually looking for. Hence asking the question here: amongst a group of Qt experts who are not controlled by revenue-generating curating algorithms and who could point me to the most appropriate articles for my questions. Thanks for the links. I will check them out and hopefully they will give me the info I seek. -jct > On 12 Jul 2016, at 16:38, Mitch Curtis <mitch.cur...@qt.io> wrote: > > Have you tried Google? :D These two links probably cover your first two > questions: > > http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html > http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph-renderer.html > > >> -Original Message- >> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org] >> On Behalf Of John C. Turnbull >> Sent: Tuesday, 12 July 2016 4:06 AM >> To: Uwe Rathmann <uwe.rathm...@tigertal.de> >> Cc: interest@qt-project.org >> Subject: Re: [Interest] Utilizing the GPU, how to start? >> >> Anyone? >> >>>> On 10 Jul 2016, at 23:23, John C. Turnbull <ozem...@ozemail.com.au> >>> wrote: >>> >>> I am still new to Qt but am very interested in the technology and the >> deep innards of how it functions. I have worked in a 3D animation studio >> and learned a lot while I was there. >>> >>> Is there documentation or articles that: >>> >>> 1) Describe in detail how the Qt Quick rendering pipeline is designed >> and how it operates. >>> >>> 2) Describe the structure and overall architecture of the Qt Quick >> Scenegraph and how it is rendered? >>> >>> 3) Describe the steps that have been taken so far and any further steps >> planned to optimise both (1) and (2)? >>> >>> I really want to know how all this hangs together as I may be able to >> further optimise and improve aspects of them. >>> >>> -jct ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Anyone? > On 10 Jul 2016, at 23:23, John C. Turnbull <ozem...@ozemail.com.au> wrote: > > I am still new to Qt but am very interested in the technology and the deep > innards of how it functions. I have worked in a 3D animation studio and > learned a lot while I was there. > > Is there documentation or articles that: > > 1) Describe in detail how the Qt Quick rendering pipeline is designed and how > it operates. > > 2) Describe the structure and overall architecture of the Qt Quick Scenegraph > and how it is rendered? > > 3) Describe the steps that have been taken so far and any further steps > planned to optimise both (1) and (2)? > > I really want to know how all this hangs together as I may be able to further > optimise and improve aspects of them. > > -jct > >>> On 10 Jul 2016, at 22:24, Uwe Rathmann <uwe.rathm...@tigertal.de> wrote: >>> >>> On Fri, 08 Jul 2016 18:51:47 +0200, Giuseppe D'Angelo wrote: >>> >>> This seems _very_ interesting and worth researching, are you going to >>> share some results during the QtCon session you mentioned earlier? >> >> When time has come I will release my package under a Open Source License, >> but I first need to reach a certain level of features and quality. But at >> least Andrew ( when I can't make it myself ) will have the code with him. >> >> We have not yet decided which details we like to present, but to be >> honest I wouldn't consider details of this vertex list generation being >> the most interesting aspect. The features are quite obvious, the >> implementation is in line with the design of the other QSG classes ( very >> similar to what you find in QSGRectangleNode ) - nothing specific sexy, >> it's simply: someone has to do it. >> >> An approach I would prefer to what I have today is some sort of paint >> engine. Something you could feed - at least - with a painter path - that >> spits out vertex lists. >> >> Maybe more interesting from my point of view is code, that is currently >> implemented inside of QQuick classes, but could be moved to more >> lightweight QSG classes. F.e creating texture nodes with QPainter or the >> node tree generation for texts ( currently I'm needs a static QQuickText >> item as helper ). >> >> -- >> >> But when it comes to the QQuick classes my way of thinking is often >> controversial to the existing code: >> >> I would like to have the C++ class APIs more compliant with what I >> consider being "well established Qt standards". >> >> The Quick framework itself could be smarter: stuff like not calling >> updatePaintNode for invisible items or delaying expensive operations >> until updatePolish ( where the layout is stable ) are obvious examples >> for how to improve the overall performance. >> >> Uwe >> >> >> >> >> >> >> ___ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
I am still new to Qt but am very interested in the technology and the deep innards of how it functions. I have worked in a 3D animation studio and learned a lot while I was there. Is there documentation or articles that: 1) Describe in detail how the Qt Quick rendering pipeline is designed and how it operates. 2) Describe the structure and overall architecture of the Qt Quick Scenegraph and how it is rendered? 3) Describe the steps that have been taken so far and any further steps planned to optimise both (1) and (2)? I really want to know how all this hangs together as I may be able to further optimise and improve aspects of them. -jct > On 10 Jul 2016, at 22:24, Uwe Rathmannwrote: > >> On Fri, 08 Jul 2016 18:51:47 +0200, Giuseppe D'Angelo wrote: >> >> This seems _very_ interesting and worth researching, are you going to >> share some results during the QtCon session you mentioned earlier? > > When time has come I will release my package under a Open Source License, > but I first need to reach a certain level of features and quality. But at > least Andrew ( when I can't make it myself ) will have the code with him. > > We have not yet decided which details we like to present, but to be > honest I wouldn't consider details of this vertex list generation being > the most interesting aspect. The features are quite obvious, the > implementation is in line with the design of the other QSG classes ( very > similar to what you find in QSGRectangleNode ) - nothing specific sexy, > it's simply: someone has to do it. > > An approach I would prefer to what I have today is some sort of paint > engine. Something you could feed - at least - with a painter path - that > spits out vertex lists. > > Maybe more interesting from my point of view is code, that is currently > implemented inside of QQuick classes, but could be moved to more > lightweight QSG classes. F.e creating texture nodes with QPainter or the > node tree generation for texts ( currently I'm needs a static QQuickText > item as helper ). > > -- > > But when it comes to the QQuick classes my way of thinking is often > controversial to the existing code: > > I would like to have the C++ class APIs more compliant with what I > consider being "well established Qt standards". > > The Quick framework itself could be smarter: stuff like not calling > updatePaintNode for invisible items or delaying expensive operations > until updatePolish ( where the layout is stable ) are obvious examples > for how to improve the overall performance. > > Uwe > > > > > > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Thanks. I certainly see Vulkan very much as a "future" prospect as it is clearly not even relevant in the technology world to any great extent at the moment. I was just curious if Vulkan had been considered and I am very pleased that it is "on the radar" where it should be. -jct > On 6 Jul 2016, at 20:26, Sean Harmer <sean.har...@kdab.com> wrote: > > > >> On 06/07/2016 10:41, John C. Turnbull wrote: >> Thanks - great to hear! >> >> I am a firm believer in the significance that Vulkan will play in the future >> of GPU based applications. > > That's also my view. However, we are not yet at the stage where the graphics > API is the bottleneck for most work loads, especially with Qt Quick. Even > in Qt 3D we are still bottle-necked by the CPU work that needs to be done > prior to the CPU load of submitting the actual OpenGL calls. > > For Qt Quick there is a lot of lower hanging fruit to be tackled than > providing a Vulkan backend. Laszlo is doing great work in abstracting the Qt > Quick renderer to make it work with other backends which will enable a Vulkan > renderer in the future - along with DX12 and Metal. > > Qt 3D already has an architecture that would make it relatively easy to add > backends for other graphics API but again, we have plenty of other stuff > to tackle before OpenGL becomes the bottleneck. Especially since Qt 3D can > already take advantage of instanced rendering, compressed textures, texture > arrays, UBOs and compute shaders. Until we can be convinced that Vulkan would > remove a large bottle neck we will likely continue adding more features, > examples, documentation, fixing bugs and optimising performance. But rest > assured, Vulkan is on the radar. > > Cheers, > > Sean > >> >> On 6 Jul 2016, at 18:33, Dmitry Volosnykh <dmitry.volosn...@gmail.com> wrote: >> >>> John, here you are: https://blog.qt.io/?s=vulkan=en >>> >>>> On Wed, Jul 6, 2016 at 11:31 AM John C. Turnbull <ozem...@ozemail.com.au> >>>> wrote: >>>> Just out of interest, has anyone within the Qt community or company >>>> considered Vulkan? >>>> >>>> It looks to me as though the future of low level graphics APIs is not >>>> OpenGL or Direct3D or Metal. >>>> >>>> It's Vulkan. >>>> >>>> > On 6 Jul 2016, at 17:53, Kai Koehne <kai.koe...@qt.io> wrote: >>>> > >>>> > >>>> > >>>> >> -Original Message- >>>> >> From: Interest [mailto:interest-bounces+kai.koehne=qt...@qt-project.org] >>>> >> [...] >>>> >> Multimedia and web rendering are a different story. Others are better >>>> >> qualified to comment on the details of how WebEngine, QtMultimedia, and >>>> >> the older alternatives are implemented - but they are all wrappers >>>> >> around >>>> >> other libraries. Just because widgets don’t render their own pixels on >>>> >> the >>>> >> GPU doesn’t mean those libraries can’t render the framed content on the >>>> >> GPU, AFAIK. At least theoretically, but I’m not up-to-date on whether >>>> >> the >>>> >> widget implementations are currently doing that efficiently. >>>> > >>>> > QWeb_Engine_View indeed uses Qt Quick (and therefore potentially >>>> > the GPU) underneath , even for the widgets integration. So it might be >>>> > worth >>>> > a try porting your app from Qt WebKit to Qt WebEngine (if only because >>>> > Qt WebKit is deprecated). >>>> > >>>> > For the video, it looks like QVideoWidget might benefit from OpenGL if >>>> > it's parent is a QOpenGL widget. Maybe you can experiment with this. >>>> > (I don't have first hand experience with QVideoWidget though). >>>> > >>>> > >>>> > >>>> > Regards >>>> > >>>> > Kai >>>> > ___ >>>> > Interest mailing list >>>> > Interest@qt-project.org >>>> > http://lists.qt-project.org/mailman/listinfo/interest >>>> >>>> ___ >>>> Interest mailing list >>>> Interest@qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/interest >> >> >> ___ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Thanks - great to hear! I am a firm believer in the significance that Vulkan will play in the future of GPU based applications. > On 6 Jul 2016, at 18:33, Dmitry Volosnykh <dmitry.volosn...@gmail.com> wrote: > > John, here you are: https://blog.qt.io/?s=vulkan=en > >> On Wed, Jul 6, 2016 at 11:31 AM John C. Turnbull <ozem...@ozemail.com.au> >> wrote: >> Just out of interest, has anyone within the Qt community or company >> considered Vulkan? >> >> It looks to me as though the future of low level graphics APIs is not OpenGL >> or Direct3D or Metal. >> >> It's Vulkan. >> >> > On 6 Jul 2016, at 17:53, Kai Koehne <kai.koe...@qt.io> wrote: >> > >> > >> > >> >> -Original Message- >> >> From: Interest [mailto:interest-bounces+kai.koehne=qt...@qt-project.org] >> >> [...] >> >> Multimedia and web rendering are a different story. Others are better >> >> qualified to comment on the details of how WebEngine, QtMultimedia, and >> >> the older alternatives are implemented - but they are all wrappers around >> >> other libraries. Just because widgets don’t render their own pixels on >> >> the >> >> GPU doesn’t mean those libraries can’t render the framed content on the >> >> GPU, AFAIK. At least theoretically, but I’m not up-to-date on whether the >> >> widget implementations are currently doing that efficiently. >> > >> > QWeb_Engine_View indeed uses Qt Quick (and therefore potentially >> > the GPU) underneath , even for the widgets integration. So it might be >> > worth >> > a try porting your app from Qt WebKit to Qt WebEngine (if only because >> > Qt WebKit is deprecated). >> > >> > For the video, it looks like QVideoWidget might benefit from OpenGL if >> > it's parent is a QOpenGL widget. Maybe you can experiment with this. >> > (I don't have first hand experience with QVideoWidget though). >> > >> > >> > >> > Regards >> > >> > Kai >> > ___ >> > Interest mailing list >> > Interest@qt-project.org >> > http://lists.qt-project.org/mailman/listinfo/interest >> >> ___ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Utilizing the GPU, how to start?
Just out of interest, has anyone within the Qt community or company considered Vulkan? It looks to me as though the future of low level graphics APIs is not OpenGL or Direct3D or Metal. It's Vulkan. > On 6 Jul 2016, at 17:53, Kai Koehnewrote: > > > >> -Original Message- >> From: Interest [mailto:interest-bounces+kai.koehne=qt...@qt-project.org] >> [...] >> Multimedia and web rendering are a different story. Others are better >> qualified to comment on the details of how WebEngine, QtMultimedia, and >> the older alternatives are implemented - but they are all wrappers around >> other libraries. Just because widgets don’t render their own pixels on the >> GPU doesn’t mean those libraries can’t render the framed content on the >> GPU, AFAIK. At least theoretically, but I’m not up-to-date on whether the >> widget implementations are currently doing that efficiently. > > QWeb_Engine_View indeed uses Qt Quick (and therefore potentially > the GPU) underneath , even for the widgets integration. So it might be worth > a try porting your app from Qt WebKit to Qt WebEngine (if only because > Qt WebKit is deprecated). > > For the video, it looks like QVideoWidget might benefit from OpenGL if > it's parent is a QOpenGL widget. Maybe you can experiment with this. > (I don't have first hand experience with QVideoWidget though). > > > > Regards > > Kai > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Problem with ^ on a Macintosh with German keyboard layout
> On Jun 14, 2016, at 2:31 PM, Thiago Macieira <thiago.macie...@intel.com> > wrote: > > On terça-feira, 14 de junho de 2016 13:58:47 PDT John Weeks wrote: >> On a German keyboard on Macintosh, shift+6 is a combining (or dead key) ^ >> character. If you hit, for instance, shift+6 then "e", you get ê. In some >> applications, but not in a Qt application, you can enter a non-combining ^ >> using control-shift-option-6. In Qt, the character doesn't make it through >> because the QKeyEvent::text() function returns an empty string. > > Try pressing ^ followed by space. That's how deadkeys are entered in all OSes > and have been since the late 1980s. Thanks. On my keyboard and Macintosh and also on my (foul language) Dell keyboard on Windows this works. > I can't reproduce your Control+Shift+Option+6 shortcut in Terminal.app either. Nor can I consistently. I'm trying figure this out from my own US keyboard with a German layout selected. That's not a great way to do it... But I've always considered TextEdit to be the True Standard :) > >> On Windows, the ^ dead key is where a US keyboard has ` and ~. If you hold >> down Alt and hit that key twice, it enters a non-combining ^. And this >> works in Qt. > > I can't reproduce this. If I do that, I get "66" in some places and the > equivalent for Alt+6 in others. If you meant AltGr instead of Alt, then I get > ¼¼. No AltGr on my Dell keyboard (also no Break key, but that's another story!). I think the ^ dead key followed by space is what I'm looking for. And the bottom line is that trying things on one keyboard doesn't even scratch the surface as far as international keyboards or text entry. -John ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Problem with ^ on a Macintosh with German keyboard layout
On a German keyboard on Macintosh, shift+6 is a combining (or dead key) ^ character. If you hit, for instance, shift+6 then "e", you get ê. In some applications, but not in a Qt application, you can enter a non-combining ^ using control-shift-option-6. In Qt, the character doesn't make it through because the QKeyEvent::text() function returns an empty string. On Windows, the ^ dead key is where a US keyboard has ` and ~. If you hold down Alt and hit that key twice, it enters a non-combining ^. And this works in Qt. I'm thinking of filing a bug, but thought I might solicit some comment from the European folks using Qt, who might be more expert on this sort of issue! -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QSvgRenderer::defaultSize() is wrong?
I have an SVG file (that happens to have been generated using QSvgGenerator) that has this at the start: values will be interpreted as if the system is 90 DPI. My reading here: http://www.w3.org/TR/SVG/coords.html#Units seems to indicate that unitless width and height should indicate some sort of "pixels". This seems wrong. It seems likely that the 90 DPI thing comes from http://www.w3.org/TR/SVG/coords.html#Units where 90 DPI is used *as an example*. But maybe it's I that is wrong- is there somewhere in the SVG standard that indicates that these should be interpreted at 90 DPI units? So, finally, my questions: 1) Am I right that this is wrong? 2) If it is just an assumption used to produce a consistent answer internally, then can I assume that QSvgRenderer::defaultSize() will always embody that assumption? If so, then I can scale my pictures based on a 90 DPI unit and be assured that it will always be that way. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5.6: Mouse clicks on ScrollBars also gets passed to widgets behind them
See https://bugreports.qt.io/browse/QTBUG-49549 > On May 19, 2016, at 1:40 PM, Chris Gripeos <chris.grip...@harmonixmusic.com> > wrote: > > > Hello, > > I'm not sure if this is the right place to ask this question. > > I just noticed that when I click on a Scrollbar of a Widget, any child > Widgets that might be right behind the scroll bar at the position of the > mouse click, will also get the mouse click event. > > So, if you have a QTextEdit behind the Scrollbar and you click on the > Scrollbar right where the Scrollbar overlaps the QTextEdit, the QTextEdit > widget will come to focus. > > Is this the defined behavior? Or is it perhaps a bug? > > If this is the defined behavior, is there a way to disable it so that the > scroll bar consumes the event and prevents it from getting passed to any > widgets behind it? > > Thanks in advance for any help. > > cg -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Menu causes problems on OS X
https://bugreports.qt.io/browse/QTBUG-53315 > On May 10, 2016, at 11:51 AM, John Weeks <j...@wavemetrics.com> wrote: > > The very simple application posted below (it is a complete runnable example) > creates a window that puts up a menu on clicking in the window. If you select > "Open File..." it then puts up a QFileDialog to choose a file. Upon > returning, the window no longer appears to active. Experience with our real > application where we observe this behavior suggests that Qt thinks the window > is still active, but OS X does not. This causes other strange problems. > > Application works as expected on Windows. > > I am inclined to believe this is a Qt bug. But I would be interested to know > what others think, and if you might know of a work-around. > > Thanks! > > -John Weeks > > #include > #include > #include > #include > #include > #include > #include > #include > > class MainWindow : public QMainWindow > { > public: > explicit MainWindow(QWidget *parent = 0); > ~MainWindow(); > > protected: > voidmouseReleaseEvent(QMouseEvent * event); > > private: > }; > > MainWindow::MainWindow(QWidget *parent) : > QMainWindow(parent) > { > } > > MainWindow::~MainWindow() > { > } > > void MainWindow::mouseReleaseEvent(QMouseEvent * event) > { > QMenu menu; > menu.addAction("Open File..."); > QAction * selectedAction = menu.exec(event->globalPos()); > > if (selectedAction) > { > QFileDialog::Options options = 0; > // options |= QFileDialog::DontUseNativeDialog; > QString fullQtPath = QFileDialog::getOpenFileName(NULL, > QStringLiteral("Dialog Caption"), QString(), QString(), nullptr, options); > qDebug() << fullQtPath; > } > } > > int main(int argc, char *argv[]) > { > QApplication a(argc, argv); > MainWindow w; > w.show(); > > return a.exec(); > } ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Menu causes problems on OS X
The very simple application posted below (it is a complete runnable example) creates a window that puts up a menu on clicking in the window. If you select "Open File..." it then puts up a QFileDialog to choose a file. Upon returning, the window no longer appears to active. Experience with our real application where we observe this behavior suggests that Qt thinks the window is still active, but OS X does not. This causes other strange problems. Application works as expected on Windows. I am inclined to believe this is a Qt bug. But I would be interested to know what others think, and if you might know of a work-around. Thanks! -John Weeks #include #include #include #include #include #include #include #include class MainWindow : public QMainWindow { public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); protected: voidmouseReleaseEvent(QMouseEvent * event); private: }; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { } MainWindow::~MainWindow() { } void MainWindow::mouseReleaseEvent(QMouseEvent * event) { QMenu menu; menu.addAction("Open File..."); QAction * selectedAction = menu.exec(event->globalPos()); if (selectedAction) { QFileDialog::Options options = 0; // options |= QFileDialog::DontUseNativeDialog; QString fullQtPath = QFileDialog::getOpenFileName(NULL, QStringLiteral("Dialog Caption"), QString(), QString(), nullptr, options); qDebug() << fullQtPath; } } int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] "Internal mouse button tracking invalid" messages
> On Mar 22, 2016, at 5:30 AM, René J. V. Bertin <rjvber...@gmail.com> wrote: > > Any idea if the proposed changes in the code reviews are in any way > backportable > to 5.6? No idea at all. I only know about the bug because it affects us. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] "Internal mouse button tracking invalid" messages
https://bugreports.qt.io/browse/QTBUG-42846 > On Mar 21, 2016, at 6:09 AM, René J.V. Bertin <rjvber...@gmail.com> wrote: > > Hi, > > Qt 5.6.0 prints out message about invalid internal mouse button tracking > situations in the QNSview class. Are those indicative of errors in user code, > or are they internal debugging messages that shouldn't really be printed in > production code? > > R. > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Are slots even needed these days?
Nobody's mentioned the fact that an overridden virtual slot requires an absolutely horrid cast in order to use the new PMF syntax. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [OS X] maintaining a list of own WIds
> On Mar 4, 2016, at 11:24 AM, René J. V. Bertin <rjvber...@gmail.com> wrote: > > Indeed. But it seems it *is* possible to be notified when the widget > (finally) > does become visible using something like Which is exactly what we do because we need to know *before* a window is minimized: void IgorNormalWindow::showEvent(QShowEvent *event) { QWidget::showEvent(event); emit windowVisibilityChanged(this, true); TellIgorWindowStatus(this, WINDOW_STATUS_DID_SHOW, 0); #ifdef MACIGOR if (!igorNSWindowNotifier) { if (!IgorApp()->IsMDI()) { igorNSWindowNotifier = CreateMinimizeNotification(reinterpret_cast(effectiveWinId()), reinterpret_cast(this)); SetNSWindowParticipatesInCycle(this, false); } } else { if (IgorApp()->IsMDI()) { DeleteIgorCocoaWindowNotifier(igorNSWindowNotifier); igorNSWindowNotifier = NULL; } } #endif } The CreateMinimizeNotification() function wraps Objective C++ code that ultimately does this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleMinimizationNotification:) name:@"NSWindowWillMiniaturizeNotification" object:cocoaWindow]; -John ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [OS X] maintaining a list of own WIds
> Actually, I'm also seeing QNSWindows (even the occasional QNSPanel). I'm not > perfectly sure if I've ever seen instances of those because of a WId I > received; > can you be that all WIds are always and exclusively of the (Q)NSView > persuasion? Well, my experience is only with our application that doesn't use sheets, drawers or other such things. When we get a wID, it is always an NSView. > internalWinId() is defined as `inline WId internalWinId() const { return data- >> winid; }` in the QWidget class definition, so I doubt that calling the >> function > will have a lot of side-effects if no winid was created yet ;) Right- which is exactly why we use it. Calling QWidget::winID() will create the wID if it doesn't already exist, and that's not necessarily a good thing! > That's what I was really asking about: how > to get notified each time something is created that has a WId. Which is complicated by Qt's insistence on creating the platform-specific thing (wID as NSView, HWND, etc.) only when the QWidget becomes visible. Or are you writing a plug-in using Qt that is to work with a non-Qt application? This: http://stackoverflow.com/questions/20453965/how-to-get-notified-when-nswindow-opens seems to indicate that you're not the only one that can't figure this out. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [OS X] maintaining a list of own WIds
> This is on OS X, so I could also use a native API like KVO on [NSApp windows] > but that doesn't seem to work as I'd like, possibly because that's not an > observable property and undoubtedly also because not all WIds are NSWindows. On OS X with Qt 5, WId's are NSViews. You can get the NSWindow from [NSView window]. And, of course, Qt doesn't create the NSWindow until the top-level widget is shown for the first time, but calling winID() will cause Qt to create an NSView even for non-top-level widgets. We call internalWinId() and we're prepared to get back nullptr. internalWinId() is undocumented, but a public API used lots of places in Qt code, so it's probably not going anywhere soon. -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
On 17 January 2016 at 14:30, Elvis Stansvik <elvst...@gmail.com> wrote: > 2016-01-17 14:48 GMT+01:00 Elvis Stansvik <elvst...@gmail.com>: > > Hi all, > > > > In an effort to cut down on the size of the standalone ZIP > > distribution of my small command line tool [1] which only uses QtCore, > > and which to my knowledge does not depend on any localization > > features, I'd like to try replacing the icudtXX.dll that I currently > > take from the Qt bin directory with a custom one built using the ICU > > Data Library Customizer [2]. > > I've slightly misunderstood how the ICU Data Library Customizer works. > I thought it would generate a icudtXX.dll, but it generates a .dat > file to be used in the compilation of ICU. > > So now that I know that I have to re-build ICU with this .dat file, my > question are: > > 1. Is it safe to replace the three icu.dll DLL files without also > re-building Qt, provided that I use the exact same ICU version, > compiled with the exact same compilation flags, but with a different > .dat file? > > 2. If so, which parts of the .dat file can I safely exclude with the > ICU Data Library Customizer? I don't think I need any of the features > which Qt uses ICU for, but are there some parts that must be included > for Qt to function at all? > > 3. Where can I find out how the ICU bundled with official Qt builds was > built? > Advice for compiling ICU can be found at https://wiki.qt.io/Compiling-ICU-with-MSVC, you don't need to worry about compatibility so much as ICU offers no binary compatibility guarantees so Qt only uses the C interface. Frankly though, ICU is a pain to build and if you're rebuilding anything I'd suggest you just rebuild Qt instead with the no ICU flag set. The only thing you loose on Windows are proper collation support for Win XP, proper toUpper/toLower support in tricky languages, and various Unicode look-up tables. If you're not worried about those then this is a better path for you. John. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Display color managed image
On 30 December 2015 at 22:25, Caio S. Souza <caiobio...@gmail.com> wrote: > Hi! > I posted this question on the QT forum and recommended me to ask it in > the mailing list. I am developing an image manipulation app that must > be color managed. I have a pixel buffer with the colors already > converted to the display profile. I researched a lot and found that > QImage works with colors in a linear color space, so everything should > be ok. But if I create a pixmap using QPixmap::fromImage, does QT > apply any color transformation before displaying the image? If it > does, what is the recommended way to display this image without > modifications? > It's been a very long time since I looked into color management in Qt4 and I'm no expert (it confuses the hell out of me), but I doubt much has changed since. Qt pretty much ignores color management entirely and leaves it up to you to sort out, but it doesn't provide any way of managing it. If you're seeing anything happening then it's at the host system level when managing the native graphics context or in the window manager, i.e. on a Mac it's baked in and always on, on Windows you have to turn it on. On Linux, well it's a mess depending on which desktop you're running. In short, I don't think Qt itself applies anything, but the host platform might manage the result. John. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Drawing in a high DPI QImage on Windows
We have a number of places in our code where we draw into an image (QImage, QPixmap, or a native image type) in order to improve performance. On Macintosh, we can call QWindow::devicePixelRatio() to find a scale factor for figuring out the dimensions of the image from the size of feature we need on the screen in device-independent points. We also need to do this on Windows. But Windows doesn't have the luxury of controlling the hardware, so the appropriate scale factor might not be 2.0 as it is on a Retina screen. In fact, we are now in possession of a Dell laptop with Windows scale factor set by default to 2.5. Can someone show some example code or suggest API's to use for this? It appears that devicePixelRatio() will only return integer values. We are currently building against a pretty recent build of Qt 5.6. Thanks! -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Putting a define with spaces in the .pro file?
Our .pro files have things like this: DESTDIR = $$quote(../IgorPhoenixFolder) Does that provide any traction? -John Weeks WaveMetrics, Inc. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] qSwap or std::swap?
> Both are correct, since one is implemented in terms of the other. That means > they MUST expand to exactly the same assembly (and they do, I've just tested). > > If you're seeing something different, the problem is probably your code. And > that's why Marc is recommending qSwap: because people don't know how to use > std::swap. There's a big gotcha: you MUST NOT write the "std::" part of > std::swap. At the risk of making a fool of myself, what is the difference? I thought I had learned that namespaces were just a scoping mechanism for names to avoid name collisions. Why does this make such a difference in the generated code? I'm old enough now that the risk of making a fool of myself is a small price to pay in order to learn something. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] qSwap or std::swap?
Thank you, Konstantin and Thiago. > Don't worry. ADL is one of the most complex and obscure corners of C++. It's > several pages long in the standard, all started from an innocent-looking > idea, > "wouldn't it be nice if f(x) called N::f(N::X)?". > > I think it's only less complex than overload resolution, but overloads are > better understood (you can't live without them). I mean, overloads without > templates... that gets complex again. Right. That's why Scott Meyers devotes quite a lot of space to it. And in C++11 with rvalue references it gets even more complex. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Keeping track of a QDialog position
Are you on a Macintosh using the Cocoa-based Qt? If so, that's what you get. Cocoa simply doesn't send move events very often. We have small tool windows and info windows that are supposed to follow graph windows around as they are dragged. More than one customer has complained that they don't follow, but only snap into position after a delay. -John Weeks WaveMetrics, Inc. > On Oct 19, 2015, at 12:36 PM, Rollastre Prostrit <rollas...@gmail.com> wrote: > > Hello. > > I am trying to keep track of the position of a QDialog as the user > clicks on the title and moves it around the desktop. At most, the only > thing I manage is to get a move event when the user releases the mouse. > But I need to keep track of the position to perform some operations > (somewhat like docking). > > After some research performed, I learned about the > NonClientAreaMouseButtonPress, NonClientAreaMouseButtonRelease, and > NonClientAreaMouseButtonMove events which I can play with and would > suffice for my use case. But I'm not getting such events in Linux (KDE) > so this solution seems to not be portable. > > Can anybody suggest any way to solve this? > > Thanks > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Odd new-style connect()/disconnect() error with Qt 5.5.0
> On Oct 14, 2015, at 11:37 AM, Bob Hood <bho...@comcast.net> wrote: > > Well, disregard that question. I can use use the static_cast<> in these > instances. They'll be rare enough, I suppose. I ran into the overloaded slot problem myself and concluded that the compile-time error checking wasn't worth the incredibly obscure cast required to make the new syntax work. -John Weeks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest