From elvstone at gmail.com Mon Feb 1 08:39:47 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Mon, 1 Feb 2016 08:39:47 +0100 Subject: [Interest] Stacked area chart and chart orientation in Qt Charts In-Reply-To: References: Message-ID: Den 1 feb 2016 1:59 fm skrev "Nikita Krupenko" : > > 2016-01-27 8:56 GMT+02:00 Elvis Stansvik : > > Hi all, > > > > I noticed that Qt Charts has a stacked bar chart, but no stacked area > > chart like this: > > > > http://www.highcharts.com/demo/area-stacked > > > > Though you could of course compose one of multiple area charts > > yourself. But doesn anyone know if there's API planned for simplifying > > working with stacked area charts? In my case it's a bunch of > > concentrations (percentage), and they data series' might change in > > response to use actions, which would invalidate the entire chart. > > You can look at his example: > https://doc.qt.io/QtCharts/qtcharts-chartthemes-example.html Thanks Nikita, yes I found the examples and have been looking through the classes. My question was mostly whether there's any plans for adding API to simplify working with stacked area charts. And I guess also what the plan is for QtCharts in general, whether it will stay mostly a "basic" charting library or if more charts and chart properties are planned? Is it considered "done" featurewise? Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.blasche at theqtcompany.com Mon Feb 1 08:53:23 2016 From: alexander.blasche at theqtcompany.com (Blasche Alexander) Date: Mon, 1 Feb 2016 07:53:23 +0000 Subject: [Interest] 5.5.1 OSX BTLE compile error - UUID is deprecated In-Reply-To: <3515021.uksDeuD9RL@tjmaciei-mobl4> References: , <3515021.uksDeuD9RL@tjmaciei-mobl4> Message-ID: On Friday 29 January 2016 20:49:49 Jason H wrote: >> I don't know if this is fixed in 5.6? >From: Interest on behalf of Thiago Macieira >Looks like it is. https://bugreports.qt.io/browse/QTBUG-48518 -- Alex From gurrieristefano at gmail.com Mon Feb 1 09:25:02 2016 From: gurrieristefano at gmail.com (Stefano Gurrieri) Date: Mon, 1 Feb 2016 09:25:02 +0100 Subject: [Interest] show qt application on hdmi video output Message-ID: Hi, on my system (based on iMx6) I've two video output; specifically: on /dev/fb0 I've linked a display lvds (800x600) on /dev/fb2 I/ve linked a display hdmi (1920x1080) Normally, my qml app runs on /dev/fb0. But now, I've the necessity to run this application on /dev/fb2 (hdmi output). So I set the variable QT_QPA_EGLFS_FB=/dev/fb2 but I don't see the app runs on hdmi. Someone could you help me? Thanks a lot Stefano -------------- next part -------------- An HTML attachment was scrubbed... URL: From prashanth.udupa at gmail.com Mon Feb 1 16:09:44 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 1 Feb 2016 20:39:44 +0530 Subject: [Interest] Shadow Mapping using QOpenGLFramebufferObject Message-ID: Hello, I am trying to render a scene (bike on a platform shown below) with shadow. [image: pasted1] I realize that we would need to make two passes for this. The first pass for rendering a depth-map from the light's point of view and the second for rendering the scene from the camera's point of view where the fragment shader uses the depth-map as a texture for determining whether fragments are inside the shadow or not. For capturing the depth map, I am rendering the scene from the light's point of view into a framebuffer as follows uint ShadowRenderWindow::renderToShadowMap() { if(!m_shadowFBO) { m_shadowFBO = new QOpenGLFramebufferObject(1024, 1024, QOpenGLFramebufferObject::Depth); m_shadowFBO->bind(); glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); m_shadowFBO->release(); } m_shadowFBO->bind(); glViewport(0, 0, m_shadowFBO->width(), m_shadowFBO->height()); glEnable(GL_DEPTH_TEST); glClear(GL_DEPTH_BUFFER_BIT); m_lightViewMatrix.setToIdentity(); m_lightViewMatrix.lookAt( m_lightPositionMatrix.map( QVector3D(0,0,0) ), m_sceneBounds.center(), m_lightPositionMatrix.map( QVector3D(0,1,0) ).normalized() ); for(int i=0; isetRenderMode(ObjModel::SceneMode); model->render(m_projectionMatrix, m_lightViewMatrix); } m_shadowFBO->release(); return m_shadowFBO->texture(); } Each model is rendered using m_shader->bind(); model->m_vertexBuffer->bind(); model->m_indexBuffer->bind(); const QMatrix4x4 lightViewProjectionMatrix = projectionMatrix * lightViewMatrix * model->m_matrix; m_shader->enableAttributeArray("qt_Vertex"); m_shader->setAttributeBuffer("qt_Vertex", GL_FLOAT, 0, 3, 0); m_shader->setUniformValue("qt_LightViewProjectionMatrix", lightViewProjectionMatrix); Q_FOREACH(ObjModel::Part part, model->m_parts) { const uint offset = part.start * sizeof(uint); glDrawElements(part.type, part.length, GL_UNSIGNED_INT, (void*)offset); } model->m_indexBuffer->release(); model->m_vertexBuffer->release(); m_shader->release(); with vertex shader attribute vec3 qt_Vertex; uniform mat4 qt_LightViewProjectionMatrix; const float c_one = 1.0; void main(void) { gl_Position = qt_LightViewProjectionMatrix * vec4(qt_Vertex, c_one); } and fragment shader void main(void) { gl_FragDepth = gl_FragCoord.z; } And then for using the shadow texture in the second pass, I do this in the fragment shader of the second pass. float evaluateShadow(in vec4 shadowPos) { vec3 shadowCoords = shadowPos.xyz / shadowPos.w; shadowCoords = shadowCoords * 0.5 + 0.5; float closestDepth = texture2D(qt_ShadowMap, shadowCoords.xy).r; float currentDepth = shadowPos.z; float shadow = (currentDepth > closestDepth) ? 1.0 : 0.5; return shadow; } void main(void) { vec4 lmColor = evaluateLightMaterialColor(v_Normal); if(qt_ShadowEnabled == true) { float shadow = evaluateShadow(v_ShadowPosition); gl_FragColor = vec4(lmColor.xyz * shadow, qt_Material.opacity); } else gl_FragColor = lmColor; } But all of the above seems to make no difference. I am unable to see any shadow in the second pass. Can someone please point to me where I am going wrong please? Best Regards, Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pasted1 Type: image/png Size: 122998 bytes Desc: not available URL: From aj at elane2k.com Mon Feb 1 16:18:21 2016 From: aj at elane2k.com (aj at elane2k.com) Date: Mon, 01 Feb 2016 16:18:21 +0100 Subject: [Interest] qtandroidextras notification example question Message-ID: <338c4cb5a0532280c3ca269fd4c5fa35@elane2k.com> Hi, im trying to compile and run the Qt Notifier [1] example on my android 5 device. Unfortunately it doesnt work for me as there are no notifications, instead it throws a NullPointerException. When debugging the java part of it in Android Studio it seems because the m_instance from the class never got initialized, thus the exception when calling a function on it. Do i have to take care of something special to get this to work? My understanding of java is that the static instance variable should be initialized at the time im calling the static notify function from the qml part of the code, or am im missing something? Im using qt 5.5.1 on mac with jdk 1.7.0_79 ndk r10e sdk 21 Regards, Adrian Jäkel [1] http://doc.qt.io/qt-5/qtandroidextras-notification-example.html From jhihn at gmx.com Mon Feb 1 16:35:37 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 1 Feb 2016 16:35:37 +0100 Subject: [Interest] x-platform way to pull app version? Message-ID: Currently, I have a string that I have to manually maintain, is there a way I can call some function and get my application version (that's in the plist or manifest)? From edward.sutton at subsite.com Mon Feb 1 17:11:36 2016 From: edward.sutton at subsite.com (Edward Sutton) Date: Mon, 1 Feb 2016 16:11:36 +0000 Subject: [Interest] How to display custom data entry form on QLineEdit click ? Message-ID: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> I want to display a form with a numeric touch key pad plus a decimal point when user clicks on a QLIneEdit field. I did not see any signal such as editingStarted. What are approaches to implementing a custom data entry? I am targeting Android and iOS with a QWidget app. -Ed This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From igor.mironchik at gmail.com Mon Feb 1 17:18:46 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 1 Feb 2016 19:18:46 +0300 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: <56AF8566.6050005@gmail.com> Hi, On 01.02.2016 19:11, Edward Sutton wrote: > I want to display a form with a numeric touch key pad plus a decimal point when user clicks on a QLIneEdit field. > > I did not see any signal such as editingStarted. > > What are approaches to implementing a custom data entry? > > I am targeting Android and iOS with a QWidget app. You can derive from QLineEdit and override mousePressEvent() or mouseReleaseEvent() and pop-up of your key pad... > > -Ed > This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From prashanth.udupa at gmail.com Mon Feb 1 17:28:07 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 1 Feb 2016 21:58:07 +0530 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: Create a Event2Signal class as follows. #include #include #include #include class Event2Signal : public QObject { Q_OBJECT public: Event2Signal(QObject *parent=0) : QObject(parent) { } ~Event2Signal() { } void filterEvent(QObject *o, QEvent::Type type) { if(!o) return; if( m_objectEventsMap.contains(o) ) { QList &events = m_objectEventsMap[o]; if(events.contains(type)) return; events.append(type); } else { m_objectEventsMap[o].append(type); o->installEventFilter(this); } } signals: void filteredEvent(QObject *o, QEvent *e, bool *filtered); protected: bool eventFilter(QObject *obj, QEvent *e) { bool filtered = false; emit filteredEvent(obj, e, &filtered); return filtered; } private: QMap > m_objectEventsMap; }; Now, lets say you want to take some action when user mouse-presses on a lineEdit. You can do this Event2Signal *e2s = new Event2Signal(lineEdit); e2s->filterEvent(lineEdit, QEvent::MouseButtonPress); connect(e2s, &Event2Signal::filteredEvent, [=]() { // Activate your form and do other things here.. }); You can reuse this method for handling other kinds of events in signal-slot style. Hope this helps. / Prashanth On Mon, 1 Feb 2016 at 21:41 Edward Sutton wrote: > I want to display a form with a numeric touch key pad plus a decimal point > when user clicks on a QLIneEdit field. > > I did not see any signal such as editingStarted. > > What are approaches to implementing a custom data entry? > > I am targeting Android and iOS with a QWidget app. > > -Ed > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asmaloney at gmail.com Mon Feb 1 17:35:01 2016 From: asmaloney at gmail.com (Andy) Date: Mon, 1 Feb 2016 11:35:01 -0500 Subject: [Interest] [Qt3D] Several Problems w/Examples Message-ID: I am having problems with several of the examples included in Qt3D. • deferred-renderer-cpp (black screen) • deferred-renderer-qml (black screen) • enabled-qml (maybe - just flashes a bunch of random shapes?) • gltf (crash on quit) • instanced-arrays-qml (crash on quit) • planets-qml (fails to quit) • playground-qml (black screen) • scene3d-loader (crash clicking between the two buttons) • simple-qml (fails to quit) • torus-qml (crash on quit) I'm using the latest Qt3D built from the 5.6 branch. Mac OS X 10.10.5 on an iMac w/NVIDIA GeForce GTX. I reported one: https://bugreports.qt.io/browse/QTBUG-50692 But I haven't been told what other info is needed, so it seems to be stuck in "Need More Info". Is anyone else having similar problems with any of these examples? Thanks! - Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From edward.sutton at subsite.com Mon Feb 1 17:36:24 2016 From: edward.sutton at subsite.com (Edward Sutton) Date: Mon, 1 Feb 2016 16:36:24 +0000 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: <56AF8566.6050005@gmail.com> References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> <56AF8566.6050005@gmail.com> Message-ID: Thank you Igor. On Feb 1, 2016, at 10:18 AM, Igor Mironchik > wrote: Hi, On 01.02.2016 19:11, Edward Sutton wrote: I want to display a form with a numeric touch key pad plus a decimal point when user clicks on a QLIneEdit field. I did not see any signal such as editingStarted. What are approaches to implementing a custom data entry? I am targeting Android and iOS with a QWidget app. You can derive from QLineEdit and override mousePressEvent() or mouseReleaseEvent() and pop-up of your key pad… That sounds straight forward enough. Thank you! -Ed This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edward.sutton at subsite.com Mon Feb 1 17:38:40 2016 From: edward.sutton at subsite.com (Edward Sutton) Date: Mon, 1 Feb 2016 16:38:40 +0000 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: Thank you Prashanth. Your approach could be useful in *many* situations. Thank you! -Ed On Feb 1, 2016, at 10:28 AM, Prashanth Udupa > wrote: Create a Event2Signal class as follows. #include #include #include #include class Event2Signal : public QObject { Q_OBJECT public: Event2Signal(QObject *parent=0) : QObject(parent) { } ~Event2Signal() { } void filterEvent(QObject *o, QEvent::Type type) { if(!o) return; if( m_objectEventsMap.contains(o) ) { QList &events = m_objectEventsMap[o]; if(events.contains(type)) return; events.append(type); } else { m_objectEventsMap[o].append(type); o->installEventFilter(this); } } signals: void filteredEvent(QObject *o, QEvent *e, bool *filtered); protected: bool eventFilter(QObject *obj, QEvent *e) { bool filtered = false; emit filteredEvent(obj, e, &filtered); return filtered; } private: QMap > m_objectEventsMap; }; Now, lets say you want to take some action when user mouse-presses on a lineEdit. You can do this Event2Signal *e2s = new Event2Signal(lineEdit); e2s->filterEvent(lineEdit, QEvent::MouseButtonPress); connect(e2s, &Event2Signal::filteredEvent, [=]() { // Activate your form and do other things here.. }); You can reuse this method for handling other kinds of events in signal-slot style. Hope this helps. / Prashanth On Mon, 1 Feb 2016 at 21:41 Edward Sutton > wrote: I want to display a form with a numeric touch key pad plus a decimal point when user clicks on a QLIneEdit field. I did not see any signal such as editingStarted. What are approaches to implementing a custom data entry? I am targeting Android and iOS with a QWidget app. -Ed This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edward.sutton at subsite.com Mon Feb 1 18:12:14 2016 From: edward.sutton at subsite.com (Edward Sutton) Date: Mon, 1 Feb 2016 17:12:14 +0000 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: <7E0CF13D-F3C4-4CAC-8AEE-A69A04B2AC89@subsite.com> Hi Prashanth, I do not understand how the connect syntax example or how the signal filteredEvent is raised? Could you please elaborate on implementation of the connect? On Feb 1, 2016, at 10:28 AM, Prashanth Udupa > wrote: Create a Event2Signal class as follows. #include #include #include #include class Event2Signal : public QObject { Q_OBJECT public: Event2Signal(QObject *parent=0) : QObject(parent) { } ~Event2Signal() { } void filterEvent(QObject *o, QEvent::Type type) { if(!o) return; if( m_objectEventsMap.contains(o) ) { QList &events = m_objectEventsMap[o]; if(events.contains(type)) return; events.append(type); } else { m_objectEventsMap[o].append(type); o->installEventFilter(this); } } signals: void filteredEvent(QObject *o, QEvent *e, bool *filtered); protected: bool eventFilter(QObject *obj, QEvent *e) { bool filtered = false; emit filteredEvent(obj, e, &filtered); return filtered; } private: QMap > m_objectEventsMap; }; Now, lets say you want to take some action when user mouse-presses on a lineEdit. You can do this Event2Signal *e2s = new Event2Signal(lineEdit); e2s->filterEvent(lineEdit, QEvent::MouseButtonPress); connect(e2s, &Event2Signal::filteredEvent, [=]() { // Activate your form and do other things here.. }); I do not understand how the connect syntax example or how the signal filteredEvent is raised? Is the “[=]()” a place holder? If I had: FormInputData::FormInputData(QWidget *parent) : QDialog(parent) ,ui(new Ui::FormSoftwareUpdateCheck) { ui->setupUi(this); // What does the connect code look like ? connect(e2s, &Event2Signal::filteredEvent, this, SLOT(mouseButtonPressHandler))); } void FormInputData::mouseButtonPressHandler() { // Show custom calculator entry form } Thanks, -Ed You can reuse this method for handling other kinds of events in signal-slot style. Hope this helps. / Prashanth On Mon, 1 Feb 2016 at 21:41 Edward Sutton > wrote: I want to display a form with a numeric touch key pad plus a decimal point when user clicks on a QLIneEdit field. I did not see any signal such as editingStarted. What are approaches to implementing a custom data entry? I am targeting Android and iOS with a QWidget app. -Ed This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From asmaloney at gmail.com Mon Feb 1 18:18:21 2016 From: asmaloney at gmail.com (Andy) Date: Mon, 1 Feb 2016 12:18:21 -0500 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: <7E0CF13D-F3C4-4CAC-8AEE-A69A04B2AC89@subsite.com> References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> <7E0CF13D-F3C4-4CAC-8AEE-A69A04B2AC89@subsite.com> Message-ID: Edward: "Is the “[=]()” a place holder?" He's using C++11 lambdas. There are a couple of good explanations here: https://stackoverflow.com/questions/7627098/what-is-a-lambda-expression-in-c11 --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney On Mon, Feb 1, 2016 at 12:12 PM, Edward Sutton wrote: > Hi Prashanth, > > I do not understand how the connect syntax example or how the signal > *filteredEvent* is raised? > > Could you please elaborate on implementation of the connect? > > On Feb 1, 2016, at 10:28 AM, Prashanth Udupa > wrote: > > Create a Event2Signal class as follows. > > #include > #include > #include > #include > > class Event2Signal : public QObject > { > Q_OBJECT > > public: > Event2Signal(QObject *parent=0) : QObject(parent) { } > ~Event2Signal() { } > > void filterEvent(QObject *o, QEvent::Type type) { > if(!o) return; > if( m_objectEventsMap.contains(o) ) { > QList &events = m_objectEventsMap[o]; > if(events.contains(type)) > return; > events.append(type); > } else { > m_objectEventsMap[o].append(type); > o->installEventFilter(this); > } > } > > signals: > void filteredEvent(QObject *o, QEvent *e, bool *filtered); > > protected: > bool eventFilter(QObject *obj, QEvent *e) { > bool filtered = false; > emit filteredEvent(obj, e, &filtered); > return filtered; > } > > private: > QMap > m_objectEventsMap; > }; > > Now, lets say you want to take some action when user mouse-presses on a > lineEdit. You can do this > > Event2Signal *e2s = new Event2Signal(lineEdit); > e2s->filterEvent(lineEdit, QEvent::MouseButtonPress); > connect(e2s, &Event2Signal::filteredEvent, [=]() { > // Activate your form and do other things here.. > }); > > > I do not understand how the connect syntax example or how the signal > *filteredEvent* is raised? > > Is the “[=]()” a place holder? > > If I had: > > FormInputData::FormInputData(QWidget *parent) : > > QDialog(parent) > > ,ui(new Ui::FormSoftwareUpdateCheck) > > { > > ui->setupUi(this); > > > // What does the connect code look like ? > connect(e2s, &Event2Signal::filteredEvent, > this, SLOT(mouseButtonPressHandler))); > } > > > void FormInputData::mouseButtonPressHandler() > { > // Show custom calculator entry form > } > > Thanks, > > -Ed > > > > You can reuse this method for handling other kinds of events in > signal-slot style. > > Hope this helps. > > / Prashanth > > On Mon, 1 Feb 2016 at 21:41 Edward Sutton > wrote: > >> I want to display a form with a numeric touch key pad plus a decimal >> point when user clicks on a QLIneEdit field. >> >> I did not see any signal such as editingStarted. >> >> What are approaches to implementing a custom data entry? >> >> I am targeting Android and iOS with a QWidget app. >> >> -Ed >> > >> > This email and any files transmitted with it from The Charles Machine > Works, Inc. are confidential and intended solely for the use of the > individual or entity to which they are addressed. If you have received this > email in error please notify the sender. Our company accepts no liability > for the contents of this email, or for the consequences of any actions > taken on the basis of the information provided, unless that information is > subsequently confirmed in writing. Please note that any views or opinions > presented in this email are solely those of the author and do not > necessarily represent those of the company. Finally, the recipient should > check this email and any attachments for the presence of viruses. The > company accepts no liability for any damage caused by any virus transmitted > by this email. > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Mon Feb 1 18:19:30 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 01 Feb 2016 09:19:30 -0800 Subject: [Interest] x-platform way to pull app version? In-Reply-To: References: Message-ID: <1926485.pdSzzHS9AP@tjmaciei-mobl4> On Monday 01 February 2016 16:35:37 Jason H wrote: > Currently, I have a string that I have to manually maintain, is there a way > I can call some function and get my application version (that's in the > plist or manifest)? Please search the Cocoa and Win32 API. That's not a Qt question. If you want to automate your version number, you can set a macro with it and then save: VERSION = 1.0.1 DEFINES += VERSION=\\\"$$VERSION\\\" in .cpp: const char *appversion() { return VERSION; } -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From prashanth.udupa at gmail.com Mon Feb 1 18:22:48 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 01 Feb 2016 17:22:48 +0000 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: <7E0CF13D-F3C4-4CAC-8AEE-A69A04B2AC89@subsite.com> References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> <7E0CF13D-F3C4-4CAC-8AEE-A69A04B2AC89@subsite.com> Message-ID: Hi Ed, > Is the “[=]()” a place holder? > > With Qt 5, you can now use functors and lambda functions for slots: http://doc.qt.io/qt-5/qobject.html#connect-4. If you are using a recent compiler which support C++11 standard, then you should be able to use lambda functions. Event2Signal *e2s = new Event2Signal(lineEdit); e2s->filterEvent(lineEdit, QEvent::MouseButtonPress); connect(e2s, &Event2Signal::filteredEvent, [=](QObject *o, QEvent *e, bool *filtered) { // Activate your form and do other things here.. }); Lambda functions have look like this [...](....) { .... }. - The square brackets allow you to capture one or more (or all) variables in the current stack. Typically we see usage of =. So when we use [=], we are saying that within the lambda function we would like to be able to access all variables accessible from the current stack. You could specify a list of variables also for example. - Within the round brackets, you will need to declare all parameters in the signal function. - Within the curly braces, you can write your slot code. You can read up the StackOverflow question that Andy has posted for more information about this. Connecting to signals this way frees you from having to write slots in QObject subclasses all the time. Best Regards, Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From prashanth.udupa at gmail.com Mon Feb 1 19:02:59 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 01 Feb 2016 18:02:59 +0000 Subject: [Interest] How to construct a cubemap texture using QOpenGLTexture? Message-ID: Hello there! I want to construct a cubemap texture using QOpenGLTexture using 6 images and use it to map reflections on a torus. I am using the following code to construct the cubemap const QImage posx = QImage(":/images/posx.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888);const QImage posy = QImage(":/images/posy.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888);const QImage posz = QImage(":/images/posz.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888);const QImage negx = QImage(":/images/negx.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888);const QImage negy = QImage(":/images/negy.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888);const QImage negz = QImage(":/images/negz.jpg").mirrored().convertToFormat(QImage::Format_RGBA8888); d->environment = new QOpenGLTexture(QOpenGLTexture::TargetCubeMap); d->environment->create(); d->environment->setSize(posx.width(), posx.height(), posx.depth()); d->environment->setFormat(QOpenGLTexture::RGBA8_UNorm); d->environment->allocateStorage(); d->environment->setData(0, 0, QOpenGLTexture::CubeMapPositiveX, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)posx.constBits(), 0); d->environment->setData(0, 0, QOpenGLTexture::CubeMapPositiveY, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)posy.constBits(), 0); d->environment->setData(0, 0, QOpenGLTexture::CubeMapPositiveZ, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)posz.constBits(), 0); d->environment->setData(0, 0, QOpenGLTexture::CubeMapNegativeX, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)negx.constBits(), 0); d->environment->setData(0, 0, QOpenGLTexture::CubeMapNegativeY, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)negy.constBits(), 0); d->environment->setData(0, 0, QOpenGLTexture::CubeMapNegativeZ, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)negz.constBits(), 0); d->environment->setWrapMode(QOpenGLTexture::ClampToEdge); d->environment->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear); d->environment->setMagnificationFilter(QOpenGLTexture::LinearMipMapLinear); I then bind the environment texture during paintGL() as follows ..... d->environment->bind(0); d->shader->setUniformValue("qt_Environment", 0); const int nrIndicies = d->torusResolution * d->tubeResolution * 6; glDrawElements(GL_TRIANGLES, nrIndicies, GL_UNSIGNED_INT, (void*)0);..... Vertex shader snippet is as follows .... varying vec3 v_TexCoord;.... void main(void){ .... v_TexCoord = normalize(v_Normal + v_Position); ....} The fragment shader snippet is as follows ..... varying vec3 v_TexCoord; uniform samplerCube qt_Environment;..... vec4 evaluateColor(in vec3 normal, in vec3 texCoord){ vec3 finalColor .... ..... ..... finalColor += textureCube(qt_Environment, texCoord).rgb; return vec4( finalColor, c_one );} void main(void){ gl_FragColor = evaluateColor(v_Normal, v_TexCoord);} I also have another part of the code which renders the cubemap on a skybox. While I am able to project the 6 images on the skybox and render it properly, I am unable to render the reflection on a torus object in the scene. I am getting a well lit torus, with no reflection [ http://i.stack.imgur.com/qWRwN.png ]. You can download the complete code from here [ https://goo.gl/Wu8ccb ] Can somebody help with this please? Best Regards, Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From giuseppe.dangelo at kdab.com Mon Feb 1 19:14:43 2016 From: giuseppe.dangelo at kdab.com (Giuseppe D'Angelo) Date: Mon, 1 Feb 2016 19:14:43 +0100 Subject: [Interest] Shadow Mapping using QOpenGLFramebufferObject In-Reply-To: References: Message-ID: <56AFA093.7080502@kdab.com> Il 01/02/2016 16:09, Prashanth Udupa ha scritto: > Can someone please point to me where I am going wrong please? The call "m_shadowFBO->texture();" will not return the depth texture that you need for shadow mapping, but the (useless) color texture that your QOpenGLFramebufferObject contains. There's currently no accessor for the depth texture, nor a way to create a QOGLFBO without a color texture. For this kind of usages it would be better if you roll out your own FBO class :\ (5.6 (finally!) introduces support for MRT in QOGLFBO, limited to color textures. In general, QOGLFBO is very limited and needs some love in terms of generalising its API to "modern" FBO usages. I've got a sketch of a QOGLFBOv2, but that's too long to write it in this small margin -- we ought start discussing how to properly develop the OpenGL helpers in QtGui in the post GL-ES2 world, possibly in a playground module.) Hope this helps, -- Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - The Qt Experts -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4068 bytes Desc: Firma crittografica S/MIME URL: From prashanth.udupa at gmail.com Mon Feb 1 19:19:06 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 01 Feb 2016 18:19:06 +0000 Subject: [Interest] Shadow Mapping using QOpenGLFramebufferObject In-Reply-To: <56AFA093.7080502@kdab.com> References: <56AFA093.7080502@kdab.com> Message-ID: Hi Guiseppe, The call "m_shadowFBO->texture();" will not return the depth texture > that you need for shadow mapping, but the (useless) color texture that > your QOpenGLFramebufferObject contains. There's currently no accessor > for the depth texture, nor a way to create a QOGLFBO without a color > texture. For this kind of usages it would be better if you roll out your > own FBO class :\ > Ok. Got it. Thanks :-) Best Regards, Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From prashanth.udupa at gmail.com Mon Feb 1 19:55:22 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Mon, 01 Feb 2016 18:55:22 +0000 Subject: [Interest] How to construct a cubemap texture using QOpenGLTexture? In-Reply-To: References: Message-ID: I used Guiseppe's advise and called generateMipMaps() on the environment texture and some reflections started to show up. Also, I had to update the shader code to use reflection vectors for picking colors from the cubemap texture - instead of (normal + position). I can see reflections on the torus now :-) [image: pasted1] / Prashanth -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pasted1 Type: image/png Size: 567265 bytes Desc: not available URL: From andre at familiesomers.nl Mon Feb 1 20:20:51 2016 From: andre at familiesomers.nl (=?utf-8?Q?Andr=C3=A9_Somers?=) Date: Mon, 1 Feb 2016 20:20:51 +0100 Subject: [Interest] x-platform way to pull app version? In-Reply-To: References: Message-ID: Easiest is to let your buildsystem generate some cpp code with the version numbers in each build. We compiled in version number, git id an time & date with a simple script called from qmake on every build. André Verstuurd vanaf mijn iPhone > Op 1 feb. 2016 om 16:35 heeft "Jason H" het volgende geschreven: > > Currently, I have a string that I have to manually maintain, is there a way I can call some function and get my application version (that's in the plist or manifest)? > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From jhihn at gmx.com Tue Feb 2 00:26:08 2016 From: jhihn at gmx.com (Jason H) Date: Tue, 2 Feb 2016 00:26:08 +0100 Subject: [Interest] 5.5.1 OSX BTLE compile error - UUID is deprecated In-Reply-To: References: , <3515021.uksDeuD9RL@tjmaciei-mobl4>, Message-ID: Back to my original problem, how can I compile 5.5.1 with this UUID thing even though it is deprecated? I need a working copy of Qt -- with my multimedia changes. > Sent: Monday, February 01, 2016 at 2:53 AM > From: "Blasche Alexander" > To: "interest at qt-project.org" > Subject: Re: [Interest] 5.5.1 OSX BTLE compile error - UUID is deprecated > > On Friday 29 January 2016 20:49:49 Jason H wrote: > >> I don't know if this is fixed in 5.6? > > >From: Interest on behalf of Thiago Macieira > >Looks like it is. > > https://bugreports.qt.io/browse/QTBUG-48518 > > -- > Alex > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > From thiago.macieira at intel.com Tue Feb 2 02:04:51 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 01 Feb 2016 17:04:51 -0800 Subject: [Interest] 5.5.1 OSX BTLE compile error - UUID is deprecated In-Reply-To: References: Message-ID: <26528723.TMEzqnnuI0@tjmaciei-mobl4> On Tuesday 02 February 2016 00:26:08 Jason H wrote: > Back to my original problem, how can I compile 5.5.1 with this UUID thing > even though it is deprecated? > > I need a working copy of Qt -- with my multimedia changes. Apply the patch from the change that the bug report Alex linked to. https://codereview.qt-project.org/126862 https://codereview.qt-project.org/gitweb?p=qt/qtconnectivity.git;a=commit;h=371818e71839280abafae858e9bb53c4ee6b9e5e There's a diff link in the second. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Tue Feb 2 02:05:30 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 01 Feb 2016 17:05:30 -0800 Subject: [Interest] x-platform way to pull app version? In-Reply-To: References: Message-ID: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> On Monday 01 February 2016 20:20:51 André Somers wrote: > Easiest is to let your buildsystem generate some cpp code with the version > numbers in each build. We compiled in version number, git id an time & date > with a simple script called from qmake on every build. Note that it's a bad idea to embed the time and date. A build from the exact same sources should produce the exact same binary. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From prashanth.udupa at gmail.com Tue Feb 2 06:49:58 2016 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Tue, 2 Feb 2016 11:19:58 +0530 Subject: [Interest] Shadow Mapping using QOpenGLFramebufferObject In-Reply-To: References: <56AFA093.7080502@kdab.com> Message-ID: Hello, I figured out a solution to this. I thought I should post it here, because it may be of some use to others. Since using QOpenGLFrameBufferObject was out of question, I had to create the buffer by myself using gl function calls as follows. // Refer http://learnopengl.com/#!Advanced-Lighting/Shadows/Shadow-Mapping if(m_shadowMapFBO != 0) return; // Create a texture for storing the depth map glGenTextures(1, &m_shadowMapTex); glBindTexture(GL_TEXTURE_2D, m_shadowMapTex); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, SHADOW_WIDTH, SHADOW_HEIGHT, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); GLfloat borderColor[] = { 1.0, 1.0, 1.0, 1.0 }; glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); // Create a frame-buffer and associate the texture with it. glGenFramebuffers(1, &m_shadowMapFBO); glBindFramebuffer(GL_FRAMEBUFFER, m_shadowMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, m_shadowMapTex, 0); // Let OpenGL know that we are not interested in colors for this buffer glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); // Cleanup for now. glBindFramebuffer(GL_FRAMEBUFFER, 0); glBindTexture(GL_TEXTURE_2D, 0); Then I rendered the scene by binding the shadow texture. The fragment shader code had to be updated a bit to determine whether a fragment lies within a shadow or outside of it. const float qt_ZNear=0.1; const float qt_ZFar=1000.0; float linearizeDepth(float depth) { float z = depth * 2.0 - 1.0; // Back to NDC return (2.0 * qt_ZNear * qt_ZFar) / (qt_ZFar + qt_ZNear - z * (qt_ZFar - qt_ZNear)); } float evaluateShadow(in vec4 shadowPos) { vec3 shadowCoords = shadowPos.xyz / shadowPos.w; shadowCoords = shadowCoords * c_half + c_half; if(shadowCoords.z > c_one) return c_one; float closestDepth = linearizeDepth( texture2D(qt_ShadowMap, shadowCoords.xy).r ); float currentDepth = shadowPos.z; float shadow = (currentDepth < closestDepth) ? c_one : c_half; return shadow; } With that done, I was now able to render the bike with shadows. http://i.stack.imgur.com/Rek7c.png The complete code can be downloaded from here. https://goo.gl/Cf1B3i Thanks once again Guiseppe! Best Regards, Prashanth On Mon, 1 Feb 2016 at 23:49 Prashanth Udupa wrote: > Hi Guiseppe, > > The call "m_shadowFBO->texture();" will not return the depth texture >> that you need for shadow mapping, but the (useless) color texture that >> your QOpenGLFramebufferObject contains. There's currently no accessor >> for the depth texture, nor a way to create a QOGLFBO without a color >> texture. For this kind of usages it would be better if you roll out your >> own FBO class :\ >> > > Ok. Got it. Thanks :-) > > Best Regards, > Prashanth > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvstone at gmail.com Tue Feb 2 18:45:08 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Tue, 2 Feb 2016 18:45:08 +0100 Subject: [Interest] x-platform way to pull app version? In-Reply-To: References: Message-ID: Den 1 feb 2016 8:20 em skrev "André Somers" : > > Easiest is to let your buildsystem generate some cpp code with the version numbers in each build. We compiled in version number, git id an time & date with a simple script called from qmake on every build. Small related tip from me: GIT_VERSION=$$system(git \ --git-dir $$shell_quote($$PWD/.git) \ --work-tree $$shell_quote($$PWD) \ describe --always --tags) This will give e.g. "v1.0" if building tag "v1.0" and "vX.Y-12-gabcdef" if building Git commit abcdef which is the 12:th commit after tag "vX.Y". Elvis > > André > > Verstuurd vanaf mijn iPhone > > > Op 1 feb. 2016 om 16:35 heeft "Jason H" het volgende geschreven: > > > > Currently, I have a string that I have to manually maintain, is there a way I can call some function and get my application version (that's in the plist or manifest)? > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvstone at gmail.com Tue Feb 2 18:56:47 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Tue, 2 Feb 2016 18:56:47 +0100 Subject: [Interest] x-platform way to pull app version? In-Reply-To: References: Message-ID: 2016-02-02 18:45 GMT+01:00 Elvis Stansvik : > Den 1 feb 2016 8:20 em skrev "André Somers" : >> >> Easiest is to let your buildsystem generate some cpp code with the version >> numbers in each build. We compiled in version number, git id an time & date >> with a simple script called from qmake on every build. > > Small related tip from me: > > GIT_VERSION=$$system(git \ > > --git-dir $$shell_quote($$PWD/.git) \ > > --work-tree $$shell_quote($$PWD) \ > > describe --always --tags) > > This will give e.g. "v1.0" if building tag "v1.0" and "vX.Y-12-gabcdef" if > building Git commit abcdef which is the 12:th commit after tag "vX.Y". To clarify: I'm not using this for VERSION in the .pro/code, since (I think) the VERSION must be on "X.Y.[Z]" format. But I am using it e.g. as part of the ZIP filename when I produce my Windows build on Appveyor. Elvis > > Elvis > >> >> André >> >> Verstuurd vanaf mijn iPhone >> >> > Op 1 feb. 2016 om 16:35 heeft "Jason H" het volgende >> > geschreven: >> > >> > Currently, I have a string that I have to manually maintain, is there a >> > way I can call some function and get my application version (that's in the >> > plist or manifest)? >> > _______________________________________________ >> > Interest mailing list >> > Interest at qt-project.org >> > http://lists.qt-project.org/mailman/listinfo/interest >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest From wssddc at wssddc.com Wed Feb 3 07:19:24 2016 From: wssddc at wssddc.com (Bob Babcock) Date: Wed, 3 Feb 2016 06:19:24 +0000 (UTC) Subject: [Interest] Minimal MSVC-built ICU DLLs available for download References: <56A4FC8D.3000800@gmail.com> <56A60C3C.7000502@gmail.com> Message-ID: Koehne Kai wrote in news:DB3PR02MB23430465D168E8F6F90E1E7E1D80 at DB3PR02MB234.eurprd02.prod.out look.com: > Well, QCollator uses CompareStringEx/ LCMapStringEx if ICU is not > explicitly enabled, which is only available on Windows Vista and > newer: > > http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qcollator_w > in.cpp > > But there's also a fallback using CompareString, LCMapStringW. So not > sure how exactly Thebehaviro will differ on Windows XP. I tested in an XP virtual machine and found that, as strings, 10 sorts before 2 (Windows 7 gives the natural order 2 before 10). I think I will just document this as needing a supported OS to work. It isn't really a big deal. Thanks. From boris at codesynthesis.com Wed Feb 3 15:29:41 2016 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed, 3 Feb 2016 16:29:41 +0200 Subject: [Interest] [ANN] build2 - C++ build toolchain Message-ID: Hi, build2 is an open source, cross-platform toolchain for building and packaging C++ code. It includes a build system, package manager, and repository web interface. We've also started cppget.org, a public repository of open source C++ packages. This is the first alpha release and currently it is more of a technology preview rather than anything that is ready for production. We have tested this version on various Linux'es, Mac OS, and FreeBSD. There is no Windows support yet (but cross-compilation is supported). The project's page is: https://build2.org For those who need to see examples right away, here is the introduction: https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml Enjoy, Boris From mwoehlke.floss at gmail.com Wed Feb 3 19:17:45 2016 From: mwoehlke.floss at gmail.com (Matthew Woehlke) Date: Wed, 03 Feb 2016 13:17:45 -0500 Subject: [Interest] Local version control with Qt Creator on Linux In-Reply-To: <1537927.XTSOW2ht4s@gandalf> References: <2795883.PUbnhBkOHv@gandalf> <2691326.QcqoJ0Q4sh@tjmaciei-mobl4> <1537927.XTSOW2ht4s@gandalf> Message-ID: On 2016-01-30 08:09, Bernhard Lindner wrote: > I installed git and I can see the "Git" pull-down menu in Qt Creator. I > selected the "Create Repository" menu entry and chose an empty folder. You might have better luck creating a repository where you already have your source files :-). (If you're worried about what QtC does, you can just run 'git init .' in your existing source tree. This will create a .git subdirectory but won't touch anything else. I suspect this is all QtC does, but I don't use QtC.) > Now... how can I add my existing project(s) to that repository? All other menu > entries of the "Git" menu are ghosted. Seems I can not to anything else than > creating new repositories. Your source files must reside in the repository directory. You can copy them there (as Thiago suggests), or see above. -- Matthew From Baskar.Velusamy at chevron.com Wed Feb 3 22:23:56 2016 From: Baskar.Velusamy at chevron.com (Velusamy, Baskar) Date: Wed, 3 Feb 2016 21:23:56 +0000 Subject: [Interest] QT application linking with .net ? Message-ID: <169F732F2C0FF6499C1F5D2804F20A538A8209ED@chvpkw8xmbx01.chvpk.chevrontexaco.net> Hi all, I have QT application, and I need to link some external library written in .Net based on this code (https://www.digitalrune.com/Text-Editor-Control ) . Any easy way to link these items? Thanks Bas From thiago.macieira at intel.com Wed Feb 3 22:36:14 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 03 Feb 2016 13:36:14 -0800 Subject: [Interest] QT application linking with .net ? In-Reply-To: <169F732F2C0FF6499C1F5D2804F20A538A8209ED@chvpkw8xmbx01.chvpk.chevrontexaco.net> References: <169F732F2C0FF6499C1F5D2804F20A538A8209ED@chvpkw8xmbx01.chvpk.chevrontexaco.net> Message-ID: <1813318.DEz7oEBhbO@tjmaciei-mobl4> On quarta-feira, 3 de fevereiro de 2016 21:23:56 PST Velusamy, Baskar wrote: > Hi all, > I have QT application, and I need to link some external library written in > .Net based on this code (https://www.digitalrune.com/Text-Editor-Control ) > . Any easy way to link these items? Hello Baskar It's easier if you try and tell us of any problems you faced. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center From xbenlau at gmail.com Fri Feb 5 10:25:55 2016 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 5 Feb 2016 17:25:55 +0800 Subject: [Interest] [Development] Setup CI service In-Reply-To: References: Message-ID: On 28 January 2016 at 18:31, Koehne Kai wrote: > > You can pass a control script also to an existing installer, via command > line. > > ./installer.exe --script myscript.js > > Regards > > Kai > > Awesome! But I still don't know how to control the installer. Any tips or sample program? -------------- next part -------------- An HTML attachment was scrubbed... URL: From xbenlau at gmail.com Fri Feb 5 11:50:33 2016 From: xbenlau at gmail.com (Ben Lau) Date: Fri, 5 Feb 2016 18:50:33 +0800 Subject: [Interest] [Development] Setup CI service In-Reply-To: References: Message-ID: On 5 February 2016 at 17:25, Ben Lau wrote: > > > On 28 January 2016 at 18:31, Koehne Kai > wrote: > >> >> You can pass a control script also to an existing installer, via command >> line. >> >> ./installer.exe --script myscript.js >> >> Regards >> >> Kai >> >> > Awesome! > > But I still don't know how to control the installer. Any tips or sample > program? > > I mean I don't know how to write the script. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smurphy at walbro.com Fri Feb 5 16:34:19 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Fri, 5 Feb 2016 15:34:19 +0000 Subject: [Interest] Customize QTableView selection color Message-ID: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> I’m still struggling with how to customize the selection color for items on a QTableView (previously posted as http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). I currently color the rows with custom colors based on the data being shown in each row in my model’s data(const QModelIndex &currIndex, int role) when role == Qt::BackgroundRole. I’d like for that color to persist when the user selects a row; so either I want the selection to only paint the dotted line around the entire row without changing the background color to the OS’s default selection color, or I’d also be fine if there was no change at all when the row is selected. The only reason I allow rows to be selected at all is apparently that is required to allow the user to start a drag on a row when they are attempting to reorder the rows in the table. I can’t seem to figure out where this needs to happen. Correct me if I’m wrong on any of the following: 1. I can’t use a stylesheet because the colors are different on a row-by-row basis 2. I don’t think the selection background color is controlled anywhere in the model? 3. I really don’t have any need for the user to be able to select anything – the table is meant to be a read-only display of data - EXCEPT it appears that being able to select items is a requirement for the drag-n-drop system? Any pointers? Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.crocker at analog.com Fri Feb 5 16:51:10 2016 From: william.crocker at analog.com (william.crocker at analog.com) Date: Fri, 5 Feb 2016 10:51:10 -0500 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B4C4EE.80807@analog.com> On 02/05/2016 10:34 AM, Murphy, Sean wrote: > I’m still struggling with how to customize the selection color for items on a > QTableView I use a QStyledItemDelegate. In the paint(painter,option,index) method I create my own QPalette based on selection etc and then call the base class paint function. QStyleOptionViewItemV4 subop = option; QPalette pal = qApp->palette(); if( selected ) { pal.setColor(QPalette::Highlight,Qt::darkGray); pal.setColor(QPalette::WindowText,Qt::white); pal.setColor(QPalette::HighlightedText,Qt::white); pal.setColor(QPalette::Text,Qt::white); subop.state |= QStyle::State_Selected; subop.palette = pal; } BaseClass::paint(painter,subop,index); // Note: subop. >(previously posted as > http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). I > currently color the rows with custom colors based on the data being shown in > each row in my model’s data(const QModelIndex &currIndex, int role) when role == > Qt::BackgroundRole. > > I’d like for that color to persist when the user selects a row; so either I want > the selection to only paint the dotted line around the entire row without > changing the background color to the OS’s default selection color, or I’d also > be fine if there was no change at allwhen the row is selected. The only reason I > allow rows to be selected at all is apparently that is required to allow the > user to start a drag on a row when they are attempting to reorder the rows in > the table. I can’t seem to figure out where this needs to happen. > > Correct me if I’m wrong on any of the following: > > 1.I can’t use a stylesheet because the colors are different on a row-by-row basis > > 2.I don’t think the selection background color is controlled anywhere in the model? > > 3.I really don’t have any need for the user to be able to select anything – the > table is meant to be a read-only display of data - EXCEPT it appears that being > able to select items is a requirement for the drag-n-drop system? > > Any pointers? > > Sean > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From andre at familiesomers.nl Fri Feb 5 17:35:35 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Fri, 5 Feb 2016 17:35:35 +0100 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B4CF57.3090600@familiesomers.nl> Op 05/02/2016 om 16:34 schreef Murphy, Sean: > > I’m still struggling with how to customize the selection color for > items on a QTableView (previously posted as > http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). > I currently color the rows with custom colors based on the data being > shown in each row in my model’s data(const QModelIndex &currIndex, int > role) when role == Qt::BackgroundRole. > > I’d like for that color to persist when the user selects a row; so > either I want the selection to only paint the dotted line around the > entire row without changing the background color to the OS’s default > selection color, or I’d also be fine if there was no change at allwhen > the row is selected. The only reason I allow rows to be selected at > all is apparently that is required to allow the user to start a drag > on a row when they are attempting to reorder the rows in the table. I > can’t seem to figure out where this needs to happen. > > Correct me if I’m wrong on any of the following: > > 1.I can’t use a stylesheet because the colors are different on a > row-by-row basis > > 2.I don’t think the selection background color is controlled anywhere > in the model? > > 3.I really don’t have any need for the user to be able to select > anything – the table is meant to be a read-only display of data - > EXCEPT it appears that being able to select items is a requirement for > the drag-n-drop system? > > Any pointers? > > Sean > > If I understand you correctly, you basicaly want the color of the row to be whatever it was before it was selected, right? Can't you just use a QProxyStyle and reset the selected flag from the style option before you pass on the render command to the underlying style? Have the selection work, but not be visible. A QStyledItemDelegate doing a similar trick would work as well. Just make a copy of the style option, reset the selection flag in the state variable, and pass that on to the base class. André -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.mironchik at gmail.com Fri Feb 5 17:38:06 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Fri, 5 Feb 2016 19:38:06 +0300 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B4CFEE.6050507@gmail.com> Hi, you can simple use QSS, for example: QTableView::item:selected { background: #6a6ea9; } On 05.02.2016 18:34, Murphy, Sean wrote: > > I’m still struggling with how to customize the selection color for > items on a QTableView (previously posted as > http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). > I currently color the rows with custom colors based on the data being > shown in each row in my model’s data(const QModelIndex &currIndex, int > role) when role == Qt::BackgroundRole. > > I’d like for that color to persist when the user selects a row; so > either I want the selection to only paint the dotted line around the > entire row without changing the background color to the OS’s default > selection color, or I’d also be fine if there was no change at allwhen > the row is selected. The only reason I allow rows to be selected at > all is apparently that is required to allow the user to start a drag > on a row when they are attempting to reorder the rows in the table. I > can’t seem to figure out where this needs to happen. > > Correct me if I’m wrong on any of the following: > > 1.I can’t use a stylesheet because the colors are different on a > row-by-row basis > > 2.I don’t think the selection background color is controlled anywhere > in the model? > > 3.I really don’t have any need for the user to be able to select > anything – the table is meant to be a read-only display of data - > EXCEPT it appears that being able to select items is a requirement for > the drag-n-drop system? > > Any pointers? > > Sean > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -------------- next part -------------- An HTML attachment was scrubbed... URL: From smurphy at walbro.com Fri Feb 5 17:39:46 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Fri, 5 Feb 2016 16:39:46 +0000 Subject: [Interest] Customize QTableView selection color In-Reply-To: <56B4C4EE.80807@analog.com> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4C4EE.80807@analog.com> Message-ID: <954F3AC9B636FB4F933D586E76E307EC5194D725@USWCCEXC04.WALBRONA.WALBROEM.LLC> > > I’m still struggling with how to customize the selection color for items on a > > QTableView > > I use a QStyledItemDelegate. > In the paint(painter,option,index) method I create my own QPalette based > on > selection etc and then call the base class paint function. > > QStyleOptionViewItemV4 subop = option; > QPalette pal = qApp->palette(); > if( selected ) { > pal.setColor(QPalette::Highlight,Qt::darkGray); > pal.setColor(QPalette::WindowText,Qt::white); > pal.setColor(QPalette::HighlightedText,Qt::white); > pal.setColor(QPalette::Text,Qt::white); > subop.state |= QStyle::State_Selected; > subop.palette = pal; > } > > BaseClass::paint(painter,subop,index); // Note: subop. Ok, so then in my case, I'd just inherit from QStyledItemDelegate and add a function that allows me to pass in my QMap so that I can adjust your calls of setColor() in paint() on the fly based on modelIndex. Do you happen to have any pointers for customizing the drag and drop indicator? In my case, the user can only reorder rows, so I'd like the drop indicator to just be a thick line drawn in between rows, not a rectangle around an item/row. I was playing around with a custom QProxyStyle set on the view class, overloading drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) when the element is a QStyle::PE_IndicatorItemViewItemDrop. I was able to have the indicator be just a line, but I was struggling a little to determine when the indicator needs to switch from being drawn above a row to below the row based on mouse pointer position. I didn't spend a lot of time on it though, so I may just need to go back and play with it some more. Thanks! Sean From smurphy at walbro.com Fri Feb 5 17:39:48 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Fri, 5 Feb 2016 16:39:48 +0000 Subject: [Interest] Customize QTableView selection color In-Reply-To: <56B4CF57.3090600@familiesomers.nl> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4CF57.3090600@familiesomers.nl> Message-ID: <954F3AC9B636FB4F933D586E76E307EC5194D72C@USWCCEXC04.WALBRONA.WALBROEM.LLC> > If I understand you correctly, you basicaly want the color of the row to be whatever it was before it was selected, right? > > Can't you just use a QProxyStyle and reset the selected flag from the style option before you pass on the render command to the underlying style?  Have the selection work, but not be visible. A QStyledItemDelegate doing a similar trick > would work as well. Just make a copy of the style option, reset the selection flag in the state variable, and pass that on to the base class. I'll try that. As I said in the post I made on January 29th, I was completely getting lost between who's responsibility it is to customize these things: stylesheets, QStyle, QStyledItemDelegate, the model, the view itself, etc. So this is helpful to at least get thing narrowed down. Sean From andre at familiesomers.nl Fri Feb 5 17:48:56 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Fri, 5 Feb 2016 17:48:56 +0100 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D72C@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4CF57.3090600@familiesomers.nl> <954F3AC9B636FB4F933D586E76E307EC5194D72C@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B4D278.5020400@familiesomers.nl> Op 05/02/2016 om 17:39 schreef Murphy, Sean: >> If I understand you correctly, you basicaly want the color of the row to be whatever it was before it was selected, right? >> >> Can't you just use a QProxyStyle and reset the selected flag from the style option before you pass on the render command to the underlying style? Have the selection work, but not be visible. A QStyledItemDelegate doing a similar trick >> would work as well. Just make a copy of the style option, reset the selection flag in the state variable, and pass that on to the base class. > I'll try that. As I said in the post I made on January 29th, I was completely getting lost between who's responsibility it is to customize these things: stylesheets, QStyle, QStyledItemDelegate, the model, the view itself, etc. So this is helpful to at least get thing narrowed down. > Well, there are several ways to do the same thing... A brief overview. I'd avoid style sheets. They are slow, and full of nasty little suprises. It is easy to get started with, but hard to maintain in the long run. Styles give you more control how stuff looks. They are harder to write, but easier to maintain in the long run. And using a proxy style, you can also tweak existing styles where needed, making the entry barrier lower. Models can also suggest some formatting for items. Use sparingly. It really should not be the model's task to determine the presentation. The actual rendering of items in the view is done by delegates. Delegates can completely determine how items look and what is displayed, but usually they defer to the style for that. They can be very powerfull to render non-standard items, modify data before it is rendered, etc. The QStyledItemDelegate is the standard delegate that takes things like style sheets into account. So, you have multiple angles of attack here. André From william.crocker at analog.com Fri Feb 5 19:52:58 2016 From: william.crocker at analog.com (william.crocker at analog.com) Date: Fri, 5 Feb 2016 13:52:58 -0500 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D725@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4C4EE.80807@analog.com> <954F3AC9B636FB4F933D586E76E307EC5194D725@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B4EF8A.3070904@analog.com> > > Ok, so then in my case, I'd just inherit from QStyledItemDelegate and add a function that allows me to pass in my QMap so that I can adjust your calls of setColor() in paint() on the fly based on modelIndex. > > Do you happen to have any pointers for customizing the drag and drop indicator? No. I avoid D&D because of the large ratio of work-required to ease-of-use. I can't tell you how many times I have lost a piece of email because my finger twitched as I as dragging it from the in-box to folder abc. >In my case, the user can only reorder rows, so I'd like the drop indicator to just be a thick line drawn in between rows, not a rectangle around an item/row. I was playing around with a custom QProxyStyle set on the view class, overloading drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) when the element is a QStyle::PE_IndicatorItemViewItemDrop. I was able to have the indicator be just a line, but I was struggling a little to determine when the indicator needs to switch from being drawn above a row to below the row based on mouse pointer position. I didn't spend a lot of time on it though, so I may just need to go back and play with it some more. > > Thanks! > Sean > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From mcapewell at gmail.com Fri Feb 5 22:36:07 2016 From: mcapewell at gmail.com (Michael Capewell) Date: Fri, 5 Feb 2016 21:36:07 +0000 (UTC) Subject: [Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine? References: <3AEB8D50-870E-482E-B44B-EC804AD1258B@subsite.com> <5657A3AD-AB29-4158-B190-48E6649CAC16@subsite.com> Message-ID: Edward Sutton subsite.com> writes: > > > Kai, > > Thank you for your help. > > On a Windows 7 VM machine it installs to: > >  C:\Users\edward3\.qt-license > > > When logged on as edward3 all is good. > > > This same machine operates as a Jenkins slave. > > Dumping the environment from the Jenkins job: > >  USERDOMAIN=WORKGROUP >  USERNAME=WIN7X64-ESUTTON$ >  USERPROFILE=C:\Windows\system32\config\systemprofile > > I tried copying C:\Users\edward3\.qt-license to the following without success: > >   C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license >   C:\Windows\System32\config\systemprofile\.qt-license >   C:\jenkins\.qt-license > > I had the slave building before using Qt Enterprise. What could have changed I do no know? > > > -Ed > I had this same problem. The solution is weird, but easy to do. The problem is that C:\Windows\System32\config\systemprofile\ is different depending on which user is looking at it! So if you manually copy your license there, Jenkins does not see it, because it runs as a different user. You need to get Jenkins to copy the license there so it's in the right place. So: * add an "Execute Windows batch command" section to your Jenkins project's Build steps * copy your .qt-license into C:\temp\ * Add the following two commands to the batch script text area (or add it at the top of your original script): * copy C:\temp\.qt-license %USERPROFILE%\.qtlicense * dir %USERPROFILE% * then build your project. The file will be copied and qmake should run without issue. Notice that the contents listed for that directory are different than what you see with Windows Explorer under your normal user account! From jhihn at gmx.com Fri Feb 5 22:50:35 2016 From: jhihn at gmx.com (Jason H) Date: Fri, 5 Feb 2016 22:50:35 +0100 Subject: [Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine? In-Reply-To: References: <3AEB8D50-870E-482E-B44B-EC804AD1258B@subsite.com> <5657A3AD-AB29-4158-B190-48E6649CAC16@subsite.com>, Message-ID: > Sent: Friday, February 05, 2016 at 4:36 PM > From: "Michael Capewell" > To: interest at qt-project.org > Subject: Re: [Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine? > > Edward Sutton subsite.com> writes: > > > > > > > Kai, > > > > Thank you for your help. > > > > On a Windows 7 VM machine it installs to: > > > >  C:\Users\edward3\.qt-license > > > > > > When logged on as edward3 all is good. > > > > > > This same machine operates as a Jenkins slave. > > > > Dumping the environment from the Jenkins job: > > > >  USERDOMAIN=WORKGROUP > >  USERNAME=WIN7X64-ESUTTON$ > >  USERPROFILE=C:\Windows\system32\config\systemprofile > > > > I tried copying C:\Users\edward3\.qt-license to the following without success: > > > >   C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license > >   C:\Windows\System32\config\systemprofile\.qt-license > >   C:\jenkins\.qt-license > > > > I had the slave building before using Qt Enterprise. What could have > changed I do no know? > > > > > > -Ed > > > > > I had this same problem. The solution is weird, but easy to do. The > problem is that C:\Windows\System32\config\systemprofile\ is different > depending on which user is looking at it! So if you manually copy your > license there, Jenkins does not see it, because it runs as a different user. > You need to get Jenkins to copy the license there so it's in the right place. > > So: > * add an "Execute Windows batch command" section to your Jenkins project's > Build steps > * copy your .qt-license into C:\temp\ > * Add the following two commands to the batch script text area (or add it at > the top of your original script): > * copy C:\temp\.qt-license %USERPROFILE%\.qtlicense > * dir %USERPROFILE% > * then build your project. The file will be copied and qmake should run > without issue. > > Notice that the contents listed for that directory are different than what > you see with Windows Explorer under your normal user account! If you copy the file as Adminstrator to the protected folder, everyone will see it. If you try to copy it as a normal user, it'll only be applied to that user's profile. From jhihn at gmx.com Fri Feb 5 23:32:09 2016 From: jhihn at gmx.com (Jason H) Date: Fri, 5 Feb 2016 23:32:09 +0100 Subject: [Interest] What happened to 5.5.1 branch? Message-ID: Git issues: 0. I'm using Atlassian's Source Tree. 1. I checked out the 5.5.1, and created a branch called osx_recording_params. SourceTree shows me the [osx_recording_params] in the "SourceTree" window. 2. Things were fine until 5.6 branch happened. Now, the list of pre-5.6 branches is gone. $ git branch * (HEAD detached from c595fc7) # <- this was the 5.5.1 commit of qtmultimedia that I checked out. 5.6 From smurphy at walbro.com Fri Feb 5 23:43:24 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Fri, 5 Feb 2016 22:43:24 +0000 Subject: [Interest] Customize QTableView selection color In-Reply-To: <56B4C4EE.80807@analog.com> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4C4EE.80807@analog.com> Message-ID: <954F3AC9B636FB4F933D586E76E307EC5194D812@USWCCEXC04.WALBRONA.WALBROEM.LLC> > > I’m still struggling with how to customize the selection color for items on a > > QTableView > > I use a QStyledItemDelegate. > In the paint(painter,option,index) method I create my own QPalette based > on > selection etc and then call the base class paint function. > > QStyleOptionViewItemV4 subop = option; > QPalette pal = qApp->palette(); > if( selected ) { > pal.setColor(QPalette::Highlight,Qt::darkGray); > pal.setColor(QPalette::WindowText,Qt::white); > pal.setColor(QPalette::HighlightedText,Qt::white); > pal.setColor(QPalette::Text,Qt::white); > subop.state |= QStyle::State_Selected; > subop.palette = pal; > } > > BaseClass::paint(painter,subop,index); // Note: subop. > > >(previously posted as > > http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). I > > currently color the rows with custom colors based on the data being shown > in > > each row in my model’s data(const QModelIndex &currIndex, int role) > when role == > > Qt::BackgroundRole. For future readers, which will probably be me again 6 months from now, all I needed was to create a QStyledItemDelegate with paint() reimplemented as follows: void customStyledItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyleOptionViewItem subop(option); subop.state &= ~(QStyle::State_Selected); QStyledItemDelegate::paint(painter, subop, index); } Then when an item is selected, it just gets painted the same as the model's Background and Foreground roles was already telling it to. Sean From asmaloney at gmail.com Fri Feb 5 23:50:05 2016 From: asmaloney at gmail.com (Andy) Date: Fri, 5 Feb 2016 17:50:05 -0500 Subject: [Interest] [Qt3D] Get OpenGL Information Message-ID: I have something working on Mac OS X that I'm trying to get working on Windows. I would like access to the OpenGL context so I can see what I'm actually getting when I try to set the format. I have a QWindow subclass and I'm doing this (same as the examples I think): setSurfaceType( QSurface::OpenGLSurface ); QSurfaceFormat format; if ( QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ) { format.setVersion( 4, 3 ); format.setProfile( QSurfaceFormat::CoreProfile ); } format.setDepthBufferSize( 24 ); format.setSamples( 4 ); format.setStencilBufferSize( 8 ); setFormat( format ); create(); The docs for QWindow::format() state explicitly that the OpenGL information may not be updated in create(), so use the QOpenGLContext's format() to get this information instead. How do I get access to my subclassed QWindow's QOpenGLContext using Qt3D? I see a QOpenGLInformationService class that I think provides the info I want, but it's private. Thanks! --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Fri Feb 5 23:59:00 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Fri, 05 Feb 2016 14:59:00 -0800 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: References: Message-ID: <1672351.6foQGaaRD0@tjmaciei-mobl4> Answering the subject: 5.5.1 is released, so it no longer needs a branch. On sexta-feira, 5 de fevereiro de 2016 23:32:09 PST Jason H wrote: > Git issues: > 1. I checked out the 5.5.1, and created a branch called > osx_recording_params. SourceTree shows me the [osx_recording_params] in the > "SourceTree" window. Mistake. You should have checked out the 5.5 branch. > 2. Things were fine until 5.6 branch happened. Now, > the list of pre-5.6 branches is gone. $ git branch > * (HEAD detached from c595fc7) # <- this was the 5.5.1 commit of > qtmultimedia that I checked out. 5.6 You were detached already. It just happened that the remote branch that you happened to be detached from is now gone. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From jhihn at gmx.com Sat Feb 6 00:13:19 2016 From: jhihn at gmx.com (Jason H) Date: Sat, 6 Feb 2016 00:13:19 +0100 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: <1672351.6foQGaaRD0@tjmaciei-mobl4> References: , <1672351.6foQGaaRD0@tjmaciei-mobl4> Message-ID: > Sent: Friday, February 05, 2016 at 5:59 PM > From: "Thiago Macieira" > To: interest at qt-project.org > Subject: Re: [Interest] What happened to 5.5.1 branch? > > Answering the subject: 5.5.1 is released, so it no longer needs a branch. > > On sexta-feira, 5 de fevereiro de 2016 23:32:09 PST Jason H wrote: > > Git issues: > > 1. I checked out the 5.5.1, and created a branch called > > osx_recording_params. SourceTree shows me the [osx_recording_params] in the > > "SourceTree" window. > > Mistake. You should have checked out the 5.5 branch. > > > 2. Things were fine until 5.6 branch happened. Now, > > the list of pre-5.6 branches is gone. $ git branch > > * (HEAD detached from c595fc7) # <- this was the 5.5.1 commit of > > qtmultimedia that I checked out. 5.6 > > You were detached already. It just happened that the remote branch that you > happened to be detached from is now gone. Not sure why it got deleted. They are free. And there are others. Now I'm always getting: 'git log' failed with code 128:'fatal: bad revision '(HEAD detached from c595fc7)' with all my git actions. From szehowe.koh at gmail.com Sat Feb 6 00:46:56 2016 From: szehowe.koh at gmail.com (Sze Howe Koh) Date: Sat, 6 Feb 2016 07:46:56 +0800 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: References: <1672351.6foQGaaRD0@tjmaciei-mobl4> Message-ID: On 6 February 2016 at 07:13, Jason H wrote: > > > > Sent: Friday, February 05, 2016 at 5:59 PM > > From: "Thiago Macieira" > > To: interest at qt-project.org > > Subject: Re: [Interest] What happened to 5.5.1 branch? > > > > Answering the subject: 5.5.1 is released, so it no longer needs a branch. > > > > On sexta-feira, 5 de fevereiro de 2016 23:32:09 PST Jason H wrote: > > > Git issues: > > > 1. I checked out the 5.5.1, and created a branch called > > > osx_recording_params. SourceTree shows me the [osx_recording_params] in the > > > "SourceTree" window. > > > > Mistake. You should have checked out the 5.5 branch. > > > > > 2. Things were fine until 5.6 branch happened. Now, > > > the list of pre-5.6 branches is gone. $ git branch > > > * (HEAD detached from c595fc7) # <- this was the 5.5.1 commit of > > > qtmultimedia that I checked out. 5.6 > > > > You were detached already. It just happened that the remote branch that you > > happened to be detached from is now gone. > > > > Not sure why it got deleted. They are free. It's free to keep it in the repository, but it adds noise to, say, `git branch -r` (command line). The number of Qt versions only grows over time. Also, a branch is for making commits. Since no more commits are accepted for Qt 5.5.1, it makes sense to remove the "5.5.1" branch. If you want the 5.5.1, sources, you can check out the "v5.5.1" tag. > And there are others. Now I'm always getting: > 'git log' failed with code 128:'fatal: bad revision '(HEAD detached from c595fc7)' > with all my git actions. That's a SourceTree issue, not a git issue. Here's an old, unresolved bug report: https://answers.atlassian.com/questions/293099/git-log-failed-with-code-128-fatal-bad-revision-detached-from-35e6d4e Here's what others have done to fix very similar errors: https://answers.atlassian.com/questions/94201/error-encountered-on-source-tree-git-log-failed-with-code-128 Regards, Sze-Howe From ekke at ekkes-corner.org Sat Feb 6 11:12:34 2016 From: ekke at ekkes-corner.org (ekke) Date: Sat, 6 Feb 2016 11:12:34 +0100 Subject: [Interest] qt.labs.samples Message-ID: <56B5C712.4020101@ekkes-corner.org> Hi, found this qt.labs.controls sample in the docs https://doc-snapshots.qt.io/qt5-5.6/qtlabscontrols-gallery-example.html unfortunately it isn't part of the examples as described in the document have installed: Qt 5.6 Beta for Android and iOS Qt Creator 3.6.0 also I'm wondering why inside a .qml file I can importQtQuick2.6 but from content assist ... QtQuick 2. the list only has 2.0 ... 2.5 using 2.6 compiles and deploys well to Android device Am I missing anything or is it because of Beta ? thx helping evaluating Qt 5.6 labs.controls -- ekke (ekkehard gentz) independent software architect international development mobile apps for BlackBerry 10 workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xbenlau at gmail.com Sat Feb 6 11:15:53 2016 From: xbenlau at gmail.com (Ben Lau) Date: Sat, 6 Feb 2016 18:15:53 +0800 Subject: [Interest] [Development] Setup CI service In-Reply-To: References: Message-ID: On 5 February 2016 at 18:50, Ben Lau wrote: > > > On 5 February 2016 at 17:25, Ben Lau wrote: > >> >> >> On 28 January 2016 at 18:31, Koehne Kai >> wrote: >> >>> >>> You can pass a control script also to an existing installer, via command >>> line. >>> >>> ./installer.exe --script myscript.js >>> >>> Regards >>> >>> Kai >>> >>> >> Awesome! >> >> But I still don't know how to control the installer. Any tips or sample >> program? >> >> > I mean I don't know how to write the script. > > Finally I have figured out a way to write the script. But that works with qt installer framework only, not the official Qt installer. https://github.com/benlau/qtci/blob/master/bin/extract-ifw -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnurmi at theqtcompany.com Sat Feb 6 13:14:13 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Sat, 6 Feb 2016 12:14:13 +0000 Subject: [Interest] qt.labs.samples In-Reply-To: <56B5C712.4020101@ekkes-corner.org> References: <56B5C712.4020101@ekkes-corner.org> Message-ID: > On 06 Feb 2016, at 11:12, ekke wrote: > > Hi, > > found this qt.labs.controls sample in the docs > > https://doc-snapshots.qt.io/qt5-5.6/qtlabscontrols-gallery-example.html > > unfortunately it isn't part of the examples as described in the document > > have installed: > Qt 5.6 Beta for Android and iOS > Qt Creator 3.6.0 > > also I'm wondering why inside a .qml file I can > import QtQuick 2.6 > but from content assist ... QtQuick 2. the list only has 2.0 ... 2.5 > using 2.6 compiles and deploys well to Android device > > Am I missing anything or is it because of Beta ? > > thx helping evaluating Qt 5.6 labs.controls Hi, Unfortunately, the example didn’t make it to the beta release. The first version of the example was finished a few days after the beta. You could get the example from the project’s Git repository, but since this technology preview module is under heavy development, you'll notice that the controls shipped with Qt 5.6.0 beta are already outdated for running the latest version of the example. Therefore, I'd suggest pulling the latest 5.6 branch of qtquickcontrols2.git and building it with your existing Qt 5.6.0 beta installation. The module is relatively small so it won't take awfully long to build. To build and install the controls: $ git clone --branch 5.6 git://code.qt.io/qt/qtquickcontrols2.git $ cd qtquickcontrols2 $ path/to/Qt5.6-beta/bin/qmake $ make $ make install # note: overwrites the controls in Qt 5.6 beta To build the Gallery example, just open examples/controls/gallery/gallery.pro in Qt Creator, or build from command line if you prefer: $ cd examples/controls/gallery $ path/to/Qt5.6-beta/bin/qmake $ make $ ./gallery One more thing. You will notice that the Material style looks quite broken (QTBUG-49979). To fix this, you'd also have to pull the latest 5.6 branch of qtgraphicaleffects.git and build that with your existing Qt 5.6.0 beta installation. $ git clone --branch 5.6 git://code.qt.io/qt/qtgraphicaleffects.git $ cd qtgraphicaleffects $ path/to/Qt5.6-beta/bin/qmake $ make $ make install # note: overwrites the graphical effects in Qt 5.6 beta Now if you run the Gallery example again, this should look pretty fine. Sorry for the trouble... I hope this helps to continue evaluating the controls. ;) -- J-P Nurmi From thomas at silentwings.no Sat Feb 6 13:35:37 2016 From: thomas at silentwings.no (Thomas Sevaldrud) Date: Sat, 6 Feb 2016 13:35:37 +0100 Subject: [Interest] Drag & Drop between QTreeWidgets Message-ID: Hi, In my application I have two QTreeWidgets, and I need to drag items from one of them to the other. I am not copying or moving actual QTreeWidgetItems, this operation simply indicates that I want to add an item in the destination widget with values taken from the selected item in the source widget. Both widgets have different custom type QTreeWidgetItems. I have implemented this from the MouseMoveEvent with a QDrag::exec(Qt::CopyAction) and a simple text payload to test it out. In the receiver end I have overridden dragEnterEvent and dropEvent like so: void DragDropWidget::dragEnterEvent(QDragEnterEvent *event) { qDebug() << "dragEnter"; if (event->mimeData()->hasFormat("text/plain")) event->acceptProposedAction(); } void DragDropWidget::dropEvent(QDropEvent *event) { qDebug() << "drop: " << event->mimeData()->text(); event->acceptProposedAction(); } Now, this works, but only if I set the receiving QTreeWidget dragDropMode to "InternalMove". I am worried that I'm doing this completely wrong, and that it just works accidentally when I set this flag... Any input? Cheers, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas at silentwings.no Sat Feb 6 17:50:21 2016 From: thomas at silentwings.no (Thomas Sevaldrud) Date: Sat, 6 Feb 2016 17:50:21 +0100 Subject: [Interest] Drag & Drop between QTreeWidgets In-Reply-To: References: Message-ID: A little update; I made it work by overriding the dropMove() event and accepting it. When I did this it works, regardless of the dragDropMode. Not sure I understand how and why, but as long as it works, I guess I'm happy :-) On Sat, Feb 6, 2016 at 1:35 PM, Thomas Sevaldrud wrote: > Hi, > > In my application I have two QTreeWidgets, and I need to drag items from > one of them to the other. I am not copying or moving actual > QTreeWidgetItems, this operation simply indicates that I want to add an > item in the destination widget with values taken from the selected item in > the source widget. Both widgets have different custom type QTreeWidgetItems. > > I have implemented this from the MouseMoveEvent with a > QDrag::exec(Qt::CopyAction) and a simple text payload to test it out. In > the receiver end I have overridden dragEnterEvent and dropEvent like so: > > void DragDropWidget::dragEnterEvent(QDragEnterEvent *event) > > { > > qDebug() << "dragEnter"; > > if (event->mimeData()->hasFormat("text/plain")) > > event->acceptProposedAction(); > > } > > > void DragDropWidget::dropEvent(QDropEvent *event) > > { > > qDebug() << "drop: " << event->mimeData()->text(); > > event->acceptProposedAction(); > > > } > > > Now, this works, but only if I set the receiving QTreeWidget dragDropMode > to "InternalMove". I am worried that I'm doing this completely wrong, and > that it just works accidentally when I set this flag... Any input? > > Cheers, > Thomas > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carel.combrink at gmail.com Sat Feb 6 20:26:10 2016 From: carel.combrink at gmail.com (Carel Combrink) Date: Sat, 6 Feb 2016 21:26:10 +0200 Subject: [Interest] New release of my SpellChecker Plugin for QtCreator 3.6 Message-ID: Dear Qt Interests users. I have just uploaded a new release of my SpellChecker plugin for Qt Creator 3.6. The release contains binaries for both Windows and Ubuntu (x64). For more information on the plugin, please see the GitHub page of the project @ https://github.com/CJCombrink/SpellChecker-Plugin To download the binaries of the release see the release page @ https://github.com/CJCombrink/SpellChecker-Plugin/releases And finally to see some screenshots see the wiki page @ https://github.com/CJCombrink/SpellChecker-Plugin/wiki I am planning to integrate the plugin into Qt Creator so any feedback and bugreports will be appreciated. Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From gr at componic.co.nz Sun Feb 7 03:54:37 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Sun, 7 Feb 2016 15:54:37 +1300 Subject: [Interest] QtWebengine examples fail with 5.6 beta Message-ID: <56B6B1ED.7040104@componic.co.nz> Hi, When attemting to run any of the examples in qtwebengine\examples\webenginewidgets the program crashes and I see the following in debug.log: [0207/153930:FATAL:icu_util.cc(230)] Check failed: result. How do I run these examples (fancybrowser, demobrowser or markdowneditor)? This is with Qt 5.6 beta that I have built from source on Windows 7 using the Visual Studio 2015 command line tools with: .\configure.bat -prefix %CD%\qtbase -make-tool jom -nomake tests -opensource -confirm-license -release Glenn From xbenlau at gmail.com Sun Feb 7 04:02:22 2016 From: xbenlau at gmail.com (Ben Lau) Date: Sun, 7 Feb 2016 11:02:22 +0800 Subject: [Interest] [Development] Setup CI service In-Reply-To: References: Message-ID: On 6 February 2016 at 18:15, Ben Lau wrote: > > > On 5 February 2016 at 18:50, Ben Lau wrote: > >> >> >> On 5 February 2016 at 17:25, Ben Lau wrote: >> >>> >>> >>> On 28 January 2016 at 18:31, Koehne Kai >>> wrote: >>> >>>> >>>> You can pass a control script also to an existing installer, via >>>> command line. >>>> >>>> ./installer.exe --script myscript.js >>>> >>>> Regards >>>> >>>> Kai >>>> >>>> >>> Awesome! >>> >>> But I still don't know how to control the installer. Any tips or sample >>> program? >>> >>> >> I mean I don't know how to write the script. >> >> > Finally I have figured out a way to write the script. But that works with > qt installer framework only, not the official Qt installer. > > https://github.com/benlau/qtci/blob/master/bin/extract-ifw > A bit tricky, but now it works for official Qt installer too. https://github.com/benlau/qtci/blob/master/bin/extract-qt-installer thx -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre at familiesomers.nl Sun Feb 7 10:56:39 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Sun, 7 Feb 2016 10:56:39 +0100 Subject: [Interest] Customize QTableView selection color In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC5194D812@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4C4EE.80807@analog.com> <954F3AC9B636FB4F933D586E76E307EC5194D812@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: <56B714D7.90809@familiesomers.nl> Op 05/02/2016 om 23:43 schreef Murphy, Sean: >>> I’m still struggling with how to customize the selection color for items on a >>> QTableView >> I use a QStyledItemDelegate. >> In the paint(painter,option,index) method I create my own QPalette based >> on >> selection etc and then call the base class paint function. >> >> QStyleOptionViewItemV4 subop = option; >> QPalette pal = qApp->palette(); >> if( selected ) { >> pal.setColor(QPalette::Highlight,Qt::darkGray); >> pal.setColor(QPalette::WindowText,Qt::white); >> pal.setColor(QPalette::HighlightedText,Qt::white); >> pal.setColor(QPalette::Text,Qt::white); >> subop.state |= QStyle::State_Selected; >> subop.palette = pal; >> } >> >> BaseClass::paint(painter,subop,index); // Note: subop. >> >>> (previously posted as >>> http://lists.qt-project.org/pipermail/interest/2016-January/020760.html). I >>> currently color the rows with custom colors based on the data being shown >> in >>> each row in my model’s data(const QModelIndex &currIndex, int role) >> when role == >>> Qt::BackgroundRole. > For future readers, which will probably be me again 6 months from now, all I needed was to do exactly what I told you to do on the 5th: > to create a QStyledItemDelegate with paint() reimplemented as follows: "A QStyledItemDelegate doing a similar trick would work as well." > > void customStyledItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const > { > QStyleOptionViewItem subop(option); " Just make a copy of the style option," > subop.state &= ~(QStyle::State_Selected); " reset the selection flag in the state variable" > QStyledItemDelegate::paint(painter, subop, index); "and pass that on to the base class." > } > > Then when an item is selected, it just gets painted the same as the model's Background and Foreground roles was already telling it to. > André From jpnurmi at theqtcompany.com Sun Feb 7 13:35:18 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Sun, 7 Feb 2016 12:35:18 +0000 Subject: [Interest] qt.labs.samples In-Reply-To: <56B73791.7000908@ekkes-corner.org> References: <56B5C712.4020101@ekkes-corner.org> <56B73791.7000908@ekkes-corner.org> Message-ID: > On 07 Feb 2016, at 13:24, ekke wrote: > > Hi, > > I'm not really sure what to do. > > My environment: > • Qt with commercial license to evaluate > • OSX > • installed Qt 5.6 beta for Android and iOS > > Now I have cloned the two qt projects you mentioned > but there's no > $ path/to/Qt5.6-beta/bin/qmake > I have three folders > android_armv7, clang_64, ios > each with a bin/qmake > where should I execute the make install ? Use qmake from that Qt build that you want to test the latest controls with. For example, if you have installed Qt 5.6.0 beta to ~/Qt5.6 and you want to test on Android, you would run ~/Qt5.6/5.6/android_armv7/bin/qmake in the root of the qtquickcontrols2 repository folder. Proceed to building with ‘make', and installing with ‘make install’ in the same qtquickcontrols2 root folder. This will overwrite the controls from that particular Qt installation (that you used qmake from). Then repeat the same steps for qtgraphicaleffects to fix the Material style. If you want to do the same for iOS, wipe out the old builds (or clone new repos, whichever you prefer) and repeat the same steps except that this time you would run qmake from ~/Qt5.6/5.6/ios/bin/qmake. > also there's no > examples/controls/gallery > only > examples/Qt-5.6 The example is not shipped with the beta package. It’s in the qtquickcontrols2 Git repository that you cloned. -- J-P Nurmi From jpnurmi at theqtcompany.com Sun Feb 7 14:01:19 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Sun, 7 Feb 2016 13:01:19 +0000 Subject: [Interest] qt.labs.samples In-Reply-To: <56B73E80.60504@ekkes-corner.org> References: <56B5C712.4020101@ekkes-corner.org> <56B73791.7000908@ekkes-corner.org> <56B73E80.60504@ekkes-corner.org> Message-ID: <4D36F024-6D93-4917-AAD6-7D61BDAC0E7F@digia.com> Looks like it tries to link the new plugin to an old library in Qt 5.6-beta. Running ‘make install’ in the qtquickcontrols2 folder should help. :) -- J-P Nurmi > On 07 Feb 2016, at 13:54, ekke wrote: > > Hi, > > thanks responding on a sunday ! > > Now I understand the structure better. > > had to set the ANDROID_NDK_ROOT variable > then make runs some time, but finished with an error > see attached log > > sorry for trouble > > thx > > ekke > Am 07.02.16 um 13:35 schrieb Nurmi J-P: >>> On 07 Feb 2016, at 13:24, ekke >>> wrote: >>> >>> Hi, >>> >>> I'm not really sure what to do. >>> >>> My environment: >>> • Qt with commercial license to evaluate >>> • OSX >>> • installed Qt 5.6 beta for Android and iOS >>> >>> Now I have cloned the two qt projects you mentioned >>> but there's no >>> $ path/to/Qt5.6-beta/bin/qmake >>> I have three folders >>> android_armv7, clang_64, ios >>> each with a bin/qmake >>> where should I execute the make install ? >>> >> Use qmake from that Qt build that you want to test the latest controls with. For example, if you have installed Qt 5.6.0 beta to ~/Qt5.6 and you want to test on Android, you would run ~/Qt5.6/5.6/android_armv7/bin/qmake in the root of the qtquickcontrols2 repository folder. Proceed to building with ‘make', and installing with ‘make install’ in the same qtquickcontrols2 root folder. This will overwrite the controls from that particular Qt installation (that you used qmake from). Then repeat the same steps for qtgraphicaleffects to fix the Material style. >> >> If you want to do the same for iOS, wipe out the old builds (or clone new repos, whichever you prefer) and repeat the same steps except that this time you would run qmake from ~/Qt5.6/5.6/ios/bin/qmake. >> >> >>> also there's no >>> examples/controls/gallery >>> only >>> examples/Qt-5.6 >>> >> The example is not shipped with the beta package. It’s in the qtquickcontrols2 Git repository that you cloned. >> >> -- >> J-P Nurmi >> >> > > > -- > ekke (ekkehard gentz) > > independent software architect > international development mobile apps for BlackBerry 10 > workshops - trainings - bootcamps > > BlackBerry Elite Developer > BlackBerry Platinum Enterprise Partner > > max-josefs-platz 30, D-83022 rosenheim, germany > mailto:ekke at ekkes-corner.org > blog: http://ekkes-corner.org > apps and more: http://appbus.org > > twitter: @ekkescorner > skype: ekkes-corner > LinkedIn: http://linkedin.com/in/ekkehard/ > Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 > From jpnurmi at theqtcompany.com Sun Feb 7 14:15:36 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Sun, 7 Feb 2016 13:15:36 +0000 Subject: [Interest] qt.labs.samples In-Reply-To: <56B74260.5090900@ekkes-corner.org> References: <56B5C712.4020101@ekkes-corner.org> <56B73791.7000908@ekkes-corner.org> <56B73E80.60504@ekkes-corner.org> <4D36F024-6D93-4917-AAD6-7D61BDAC0E7F@digia.com> <56B74260.5090900@ekkes-corner.org> Message-ID: <9D2C7CE8-13E1-4C0D-AA4E-5FCD335CE64E@digia.com> Since you’re interested running the app on Android/iOS ie. on a remote device/emulator/simulator instead of locally on the host, opening gallery.pro in Qt Creator and letting it handle the deployment and execution of the app for you is the easiest option. -- J-P Nurmi > On 07 Feb 2016, at 14:10, ekke wrote: > > thx > make install worked - wasn#t sure if I should execute because make failed > > now tried the gallery > make runs without error > > but > your last line: > ./gallery > failed (no such file) > > thx again > > ekke > > Am 07.02.16 um 14:01 schrieb Nurmi J-P: >> Looks like it tries to link the new plugin to an old library in Qt 5.6-beta. Running ‘make install’ in the qtquickcontrols2 folder should help. :) >> >> -- >> J-P Nurmi >> >> >> >> >>> On 07 Feb 2016, at 13:54, ekke >>> wrote: >>> >>> Hi, >>> >>> thanks responding on a sunday ! >>> >>> Now I understand the structure better. >>> >>> had to set the ANDROID_NDK_ROOT variable >>> then make runs some time, but finished with an error >>> see attached log >>> >>> sorry for trouble >>> >>> thx >>> >>> ekke >>> Am 07.02.16 um 13:35 schrieb Nurmi J-P: >>> >>>>> On 07 Feb 2016, at 13:24, ekke >>>>> >>>>> wrote: >>>>> >>>>> Hi, >>>>> >>>>> I'm not really sure what to do. >>>>> >>>>> My environment: >>>>> • Qt with commercial license to evaluate >>>>> • OSX >>>>> • installed Qt 5.6 beta for Android and iOS >>>>> >>>>> Now I have cloned the two qt projects you mentioned >>>>> but there's no >>>>> $ path/to/Qt5.6-beta/bin/qmake >>>>> I have three folders >>>>> android_armv7, clang_64, ios >>>>> each with a bin/qmake >>>>> where should I execute the make install ? >>>>> >>>>> >>>> Use qmake from that Qt build that you want to test the latest controls with. For example, if you have installed Qt 5.6.0 beta to ~/Qt5.6 and you want to test on Android, you would run ~/Qt5.6/5.6/android_armv7/bin/qmake in the root of the qtquickcontrols2 repository folder. Proceed to building with ‘make', and installing with ‘make install’ in the same qtquickcontrols2 root folder. This will overwrite the controls from that particular Qt installation (that you used qmake from). Then repeat the same steps for qtgraphicaleffects to fix the Material style. >>>> >>>> If you want to do the same for iOS, wipe out the old builds (or clone new repos, whichever you prefer) and repeat the same steps except that this time you would run qmake from ~/Qt5.6/5.6/ios/bin/qmake. >>>> >>>> >>>> >>>>> also there's no >>>>> examples/controls/gallery >>>>> only >>>>> examples/Qt-5.6 >>>>> >>>>> >>>> The example is not shipped with the beta package. It’s in the qtquickcontrols2 Git repository that you cloned. >>>> >>>> -- >>>> J-P Nurmi >>>> >>>> >>>> >>> >>> -- >>> ekke (ekkehard gentz) >>> >>> independent software architect >>> international development mobile apps for BlackBerry 10 >>> workshops - trainings - bootcamps >>> >>> BlackBerry Elite Developer >>> BlackBerry Platinum Enterprise Partner >>> >>> max-josefs-platz 30, D-83022 rosenheim, germany >>> >>> mailto:ekke at ekkes-corner.org >>> >>> blog: >>> http://ekkes-corner.org >>> >>> apps and more: >>> http://appbus.org >>> >>> >>> twitter: @ekkescorner >>> skype: ekkes-corner >>> LinkedIn: >>> http://linkedin.com/in/ekkehard/ >>> >>> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 >>> >>> > > > -- > ekke (ekkehard gentz) > > independent software architect > international development mobile apps for BlackBerry 10 > workshops - trainings - bootcamps > > BlackBerry Elite Developer > BlackBerry Platinum Enterprise Partner > > max-josefs-platz 30, D-83022 rosenheim, germany > mailto:ekke at ekkes-corner.org > blog: http://ekkes-corner.org > apps and more: http://appbus.org > > twitter: @ekkescorner > skype: ekkes-corner > LinkedIn: http://linkedin.com/in/ekkehard/ > Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 From smurphy at walbro.com Sun Feb 7 17:35:32 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Sun, 7 Feb 2016 16:35:32 +0000 Subject: [Interest] Customize QTableView selection color In-Reply-To: <56B714D7.90809@familiesomers.nl> References: <954F3AC9B636FB4F933D586E76E307EC5194D6F8@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B4C4EE.80807@analog.com> <954F3AC9B636FB4F933D586E76E307EC5194D812@USWCCEXC04.WALBRONA.WALBROEM.LLC> <56B714D7.90809@familiesomers.nl> Message-ID: <954F3AC9B636FB4F933D586E76E307EC5194D8B7@USWCCEXC04.WALBRONA.WALBROEM.LLC> > > void customStyledItemDelegate::paint(QPainter *painter, const > QStyleOptionViewItem &option, const QModelIndex &index) const > > { > > QStyleOptionViewItem subop(option); > " Just make a copy of the style option," > > subop.state &= ~(QStyle::State_Selected); > " reset the selection flag in the state variable" > > QStyledItemDelegate::paint(painter, subop, index); > "and pass that on to the base class." > > } > > > André Sorry André! Yes I did it exactly the way you said to and forgot to give you credit. I just wanted to post the actual code back to the list in case someone searches for it later on. Sean From diegoiast at gmail.com Mon Feb 8 12:28:11 2016 From: diegoiast at gmail.com (Diego Iastrubni) Date: Mon, 8 Feb 2016 13:28:11 +0200 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: Message-ID: This is interesting... as it solves a nigher level proeblem than "configure-make-install/cmake-make-install". It smells more like gradle a little bit... which is nice. But can it handle Qt code..? resources...? UI...? "moc"? Does it work on Windows? Which reminds me: What can I use to manage (and build..?) dependencies for my Qt5 project? Lets assume I still want to build using (q|c)make, I still want some tool to ask him "give me libfoo, libssh and whatever they need, and add them to my project, then build it". 1. I needs it to work on Windows (mingw if possible) and Linux/Mac. 2. QtCreator should be able to build projects generated by this tool 3. It needs to add interdependencies between subprojects as needed 4. Ability to update when upstream releases a new version 5. FOSS I guess I am looking for a "Gradle" for C++, or maybe just something like CocoadPods to CMake. Does this thing exist? On Wed, Feb 3, 2016 at 4:29 PM, Boris Kolpackov wrote: > Hi, > > build2 is an open source, cross-platform toolchain for building and > packaging C++ code. It includes a build system, package manager, and > repository web interface. We've also started cppget.org, a public > repository of open source C++ packages. > > This is the first alpha release and currently it is more of a technology > preview rather than anything that is ready for production. We have tested > this version on various Linux'es, Mac OS, and FreeBSD. There is no Windows > support yet (but cross-compilation is supported). > > The project's page is: > > https://build2.org > > For those who need to see examples right away, here is the introduction: > > https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml > > Enjoy, > Boris > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kai.Koehne at theqtcompany.com Mon Feb 8 13:09:22 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 8 Feb 2016 12:09:22 +0000 Subject: [Interest] QtWebengine examples fail with 5.6 beta In-Reply-To: <56B6B1ED.7040104@componic.co.nz> References: <56B6B1ED.7040104@componic.co.nz> Message-ID: > -----Original Message----- > From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Glenn > Ramsey > Sent: Sunday, February 07, 2016 3:55 AM > To: interest at qt-project.org > Subject: [Interest] QtWebengine examples fail with 5.6 beta > > Hi, > > When attemting to run any of the examples in > qtwebengine\examples\webenginewidgets the program crashes and I see > the following in debug.log: > > [0207/153930:FATAL:icu_util.cc(230)] Check failed: result. This AFAIR means that Qt WebEngine couldn't locate icudtl.dat . That file should be automatically generated when compiling qtwebengine, and should be available under QT_INSTALL_DATA. > How do I run these examples (fancybrowser, demobrowser or > markdowneditor)? > > This is with Qt 5.6 beta that I have built from source on Windows 7 using > the Visual Studio 2015 command line tools with: > .\configure.bat -prefix %CD%\qtbase -make-tool jom -nomake tests - > opensource -confirm-license -release You might need to run nmake install from within qtwebengine module. (This will be fixed in the 5.6 RC). Regards Kai From jhihn at gmx.com Mon Feb 8 15:55:28 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 15:55:28 +0100 Subject: [Interest] Gerrit questions Message-ID: I'm trying to push code to gerrit, but I'm having some issues. I've fought through many already, but I'm at ! [remote rejected] HEAD -> refs/for/dev/osx_recording_params (missing Change-Id in commit message footer) error: failed to push some refs to 'ssh://scorp1us at codereview.qt-project.org:29418/qt/qtmultimedia.git' I find plenty of info on how to set the hook, but not how to _obtain_ and the change-id. From alexander.blasche at theqtcompany.com Mon Feb 8 15:59:05 2016 From: alexander.blasche at theqtcompany.com (Blasche Alexander) Date: Mon, 8 Feb 2016 14:59:05 +0000 Subject: [Interest] Gerrit questions In-Reply-To: References: Message-ID: If the hook is already installed then you can trigger it by editing the commit log message via for example "git commit --amend" or git rebase. The hook itself will generate the change-id. -- Alex ________________________________________ From: Interest on behalf of Jason H Sent: Monday, February 8, 2016 15:55 To: interest at qt-project.org Subject: [Interest] Gerrit questions I'm trying to push code to gerrit, but I'm having some issues. I've fought through many already, but I'm at ! [remote rejected] HEAD -> refs/for/dev/osx_recording_params (missing Change-Id in commit message footer) error: failed to push some refs to 'ssh://scorp1us at codereview.qt-project.org:29418/qt/qtmultimedia.git' I find plenty of info on how to set the hook, but not how to _obtain_ and the change-id. _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest From jhihn at gmx.com Mon Feb 8 16:14:53 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 16:14:53 +0100 Subject: [Interest] OSX moc_file compile error Message-ID: I'm building a modified version of Qt, I'm not used new to Objective-C. I have to include AVFoundation.h, because it has NSString key IDs, but when I do, the moc_ version of the file bombs out. How do I fix this? In file included from .moc/debug/moc_avfaudioencodersettingscontrol.cpp:9: In file included from .moc/debug/../../../../../../../../qt5/qtmultimedia/src/plugins/avfoundation/camera/avfaudioencodersettingscontrol.h:42: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:435:1: error: expected unqualified-id @class NSString, Protocol; ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:437:19: error: unknown type name 'NSString'; did you mean 'QString'? FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector); ^ ../../../../lib/QtMultimedia.framework/Headers/qaudioencodersettingscontrol.h:51:7: note: 'QString' declared here class QString; ^ ----------- Here's the file (Minus comments) #ifndef AVFAUDIOENCODERSETTINGSCONTROL_H #define AVFAUDIOENCODERSETTINGSCONTROL_H #include #include #include #include #include QT_BEGIN_NAMESPACE class AVFCameraSession; class AVFCameraService; class AVFAudioEncoderSettingsControl : public QAudioEncoderSettingsControl { Q_OBJECT public: explicit AVFAudioEncoderSettingsControl(AVFCameraService *service); QStringList supportedAudioCodecs() const Q_DECL_OVERRIDE; QString codecDescription(const QString &codecName) const Q_DECL_OVERRIDE; QList supportedSampleRates(const QAudioEncoderSettings &settings, bool *continuous = 0) const Q_DECL_OVERRIDE; QAudioEncoderSettings audioSettings() const Q_DECL_OVERRIDE; void setAudioSettings(const QAudioEncoderSettings &settings) Q_DECL_OVERRIDE; NSDictionary *settingsAsNSDictionary() const; FourCharCode codecAsFourCharCode(const QString &codec) const; private: void initCodecs(); AVFCameraSession *m_session; QAudioEncoderSettings m_settings; static QMap *m_audioCodecs; }; QT_END_NAMESPACE ----------------- From jhihn at gmx.com Mon Feb 8 16:28:25 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 16:28:25 +0100 Subject: [Interest] Gerrit questions In-Reply-To: References: , Message-ID: Thanks, that would explain why that information doesn't exist. > Sent: Monday, February 08, 2016 at 9:59 AM > From: "Blasche Alexander" > To: "interest at qt-project.org" > Subject: Re: [Interest] Gerrit questions > > If the hook is already installed then you can trigger it by editing the commit log message via for example "git commit --amend" or git rebase. > > The hook itself will generate the change-id. > -- > Alex > > ________________________________________ > From: Interest on behalf of Jason H > Sent: Monday, February 8, 2016 15:55 > To: interest at qt-project.org > Subject: [Interest] Gerrit questions > > I'm trying to push code to gerrit, but I'm having some issues. I've fought through many already, but I'm at > ! [remote rejected] HEAD -> refs/for/dev/osx_recording_params (missing Change-Id in commit message footer) > error: failed to push some refs to 'ssh://scorp1us at codereview.qt-project.org:29418/qt/qtmultimedia.git' > > I find plenty of info on how to set the hook, but not how to _obtain_ and the change-id. > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > From suy at badopi.org Mon Feb 8 18:56:43 2016 From: suy at badopi.org (Alejandro Exojo) Date: Mon, 8 Feb 2016 18:56:43 +0100 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: Message-ID: <201602081856.44040.suy@badopi.org> El Monday 08 February 2016, Diego Iastrubni escribió: > Which reminds me: > What can I use to manage (and build..?) dependencies for my Qt5 project? > Lets assume I still want to build using (q|c)make, I still want some tool > to ask him "give me libfoo, libssh and whatever they need, and add them to > my project, then build it". > > 1. I needs it to work on Windows (mingw if possible) and Linux/Mac. > 2. QtCreator should be able to build projects generated by this tool > 3. It needs to add interdependencies between subprojects as needed > 4. Ability to update when upstream releases a new version > 5. FOSS > > I guess I am looking for a "Gradle" for C++, or maybe just something like > CocoadPods to CMake. Does this thing exist? Yes (for various degrees of "yes"), Qt Pods and QPM: http://www.qt-pods.org/ https://www.qpm.io/ -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net From jhihn at gmx.com Mon Feb 8 19:10:59 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 19:10:59 +0100 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: References: <1672351.6foQGaaRD0@tjmaciei-mobl4> , Message-ID: > > Not sure why it got deleted. They are free. > > It's free to keep it in the repository, but it adds noise to, say, > `git branch -r` (command line). The number of Qt versions only grows > over time. > > Also, a branch is for making commits. Since no more commits are > accepted for Qt 5.5.1, it makes sense to remove the "5.5.1" branch. > > If you want the 5.5.1, sources, you can check out the "v5.5.1" tag. > > > > And there are others. Now I'm always getting: > > 'git log' failed with code 128:'fatal: bad revision '(HEAD detached from c595fc7)' > > with all my git actions. > > That's a SourceTree issue, not a git issue. Here's an old, unresolved > bug report: https://answers.atlassian.com/questions/293099/git-log-failed-with-code-128-fatal-bad-revision-detached-from-35e6d4e > > Here's what others have done to fix very similar errors: > https://answers.atlassian.com/questions/94201/error-encountered-on-source-tree-git-log-failed-with-code-128 I still don't see why that one got deleted and the others were allowed to stay. I'm still hosed. From thiago.macieira at intel.com Mon Feb 8 21:39:48 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 08 Feb 2016 12:39:48 -0800 Subject: [Interest] OSX moc_file compile error In-Reply-To: References: Message-ID: <19933547.lUfXrsoZHS@tjmaciei-mobl4> Em segunda-feira, 8 de fevereiro de 2016, às 16:14:53 PST, Jason H escreveu: > I'm building a modified version of Qt, I'm not used new to Objective-C. I > have to include AVFoundation.h, because it has NSString key IDs, but when I > do, the moc_ version of the file bombs out. How do I fix this? Option 1: do not include Objective-C-only headers in headers with Q_OBJECT. Include only headers that have C / C++ versions, or #ifndef out the inclusions. Option 2: #include "moc_avfaudioencodersettingscontrol.cpp" at the end of your .mm source file. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From jhihn at gmx.com Mon Feb 8 21:55:56 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 21:55:56 +0100 Subject: [Interest] OSX moc_file compile error In-Reply-To: <19933547.lUfXrsoZHS@tjmaciei-mobl4> References: , <19933547.lUfXrsoZHS@tjmaciei-mobl4> Message-ID: > Em segunda-feira, 8 de fevereiro de 2016, às 16:14:53 PST, Jason H escreveu: > > I'm building a modified version of Qt, I'm not used new to Objective-C. I > > have to include AVFoundation.h, because it has NSString key IDs, but when I > > do, the moc_ version of the file bombs out. How do I fix this? > > Option 1: do not include Objective-C-only headers in headers with Q_OBJECT. > Include only headers that have C / C++ versions, or #ifndef out the > inclusions. > > Option 2: #include "moc_avfaudioencodersettingscontrol.cpp" at the end of your > .mm source file. Awesome, thanks Thiago! I never would have thought of that. From thiago.macieira at intel.com Mon Feb 8 21:56:09 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 08 Feb 2016 12:56:09 -0800 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: References: Message-ID: <2268834.ZjB3a2kdxU@tjmaciei-mobl4> Em segunda-feira, 8 de fevereiro de 2016, às 19:10:59 PST, Jason H escreveu: > I still don't see why that one got deleted and the others were allowed to > stay. I'm still hosed. $ git ls-remote origin refs/heads/* 73a1e8c60d894701f34806cc4b847aa2814bf389 refs/heads/5.3 209a75f2d071e0977b6c0a8a2ce5d6eb0ff95b8c refs/heads/5.3.2 4a1e5dbade4bab55f39bd368480dcca9a11e4b38 refs/heads/5.4 b5ea7a5f5c849329643112cba9b57ad047c0bc4b refs/heads/5.5 12b19ca56c274565803d00bf551c32fc0f4a39b9 refs/heads/5.6 4c1b6cdd292bc571a4104fff8b5b54d47970cca1 refs/heads/5.6.0 4fb7eb0da74798205f5cac693c921065492fa33e refs/heads/dev c51d26b6ec7869641441d01597c3e7acc643f93f refs/heads/old/5.0 779fa9c590a1bf399b34fbf293d8399e61a1e15c refs/heads/old/5.1 f15d9e6ccd006a2b47b50ae755fbe9534748a2eb refs/heads/old/5.2 06c1ec4dd1df6e0bc417241bd15f164b38de87b3 refs/heads/winrt [wip branches after this] You're right. The 5.3.2 branch should be deleted, as the v5.3.2 tag points to the same commit. The 5.6.0 branch will be deleted once it's released and tagged. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From duane.hebert at group-upc.com Mon Feb 8 22:01:11 2016 From: duane.hebert at group-upc.com (Duane) Date: Mon, 8 Feb 2016 16:01:11 -0500 Subject: [Interest] vsaddin changing include format Message-ID: VSAddin 1.2.3 with Visual studio 2012 and Qt5.5. When I enter includes for Qt such as #include they get changed as I type to #include Is this intentional? Can it be configured? From jhihn at gmx.com Mon Feb 8 22:04:01 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 8 Feb 2016 22:04:01 +0100 Subject: [Interest] What happened to 5.5.1 branch? In-Reply-To: <2268834.ZjB3a2kdxU@tjmaciei-mobl4> References: , <2268834.ZjB3a2kdxU@tjmaciei-mobl4> Message-ID: > Sent: Monday, February 08, 2016 at 3:56 PM > From: "Thiago Macieira" > To: interest at qt-project.org > Subject: Re: [Interest] What happened to 5.5.1 branch? > > Em segunda-feira, 8 de fevereiro de 2016, às 19:10:59 PST, Jason H escreveu: > > I still don't see why that one got deleted and the others were allowed to > > stay. I'm still hosed. > > $ git ls-remote origin refs/heads/* > 73a1e8c60d894701f34806cc4b847aa2814bf389 refs/heads/5.3 > 209a75f2d071e0977b6c0a8a2ce5d6eb0ff95b8c refs/heads/5.3.2 > 4a1e5dbade4bab55f39bd368480dcca9a11e4b38 refs/heads/5.4 > b5ea7a5f5c849329643112cba9b57ad047c0bc4b refs/heads/5.5 > 12b19ca56c274565803d00bf551c32fc0f4a39b9 refs/heads/5.6 > 4c1b6cdd292bc571a4104fff8b5b54d47970cca1 refs/heads/5.6.0 > 4fb7eb0da74798205f5cac693c921065492fa33e refs/heads/dev > c51d26b6ec7869641441d01597c3e7acc643f93f refs/heads/old/5.0 > 779fa9c590a1bf399b34fbf293d8399e61a1e15c refs/heads/old/5.1 > f15d9e6ccd006a2b47b50ae755fbe9534748a2eb refs/heads/old/5.2 > 06c1ec4dd1df6e0bc417241bd15f164b38de87b3 refs/heads/winrt > [wip branches after this] > > You're right. The 5.3.2 branch should be deleted, as the v5.3.2 tag points to > the same commit. > > The 5.6.0 branch will be deleted once it's released and tagged. Thanks for that clarification. Should I rebase to 5.5? From thiago.macieira at intel.com Mon Feb 8 22:21:53 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 08 Feb 2016 13:21:53 -0800 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: Message-ID: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Em segunda-feira, 8 de fevereiro de 2016, às 13:28:11 PST, Diego Iastrubni escreveu: > Lets assume I still want to build using (q|c)make, I still want some tool > to ask him "give me libfoo, libssh and whatever they need, and add them to > my project, then build it". qmake's philosophy is "assume everything is there and just use it". It's meant mostly for using Qt itself, so you can be sure that all of it is present. If you use third-party libraries and they're not present, you'll get a compilation error somewhere. cmake's philosophy is to check for the presence and just degrade functionality as needed. Unlike with qmake, a required third-party library being missing would be noted during the cmake step. How to install said third-party library and inform cmake where it is, is left as an exercise to the reader. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From gr at componic.co.nz Mon Feb 8 22:31:53 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Tue, 9 Feb 2016 10:31:53 +1300 Subject: [Interest] QtWebengine examples fail with 5.6 beta In-Reply-To: References: <56B6B1ED.7040104@componic.co.nz> Message-ID: <56B90949.2060400@componic.co.nz> On 09/02/16 01:09, Koehne Kai wrote: > >> -----Original Message----- >> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Glenn >> Ramsey >> Sent: Sunday, February 07, 2016 3:55 AM >> To: interest at qt-project.org >> Subject: [Interest] QtWebengine examples fail with 5.6 beta >> >> Hi, >> >> When attemting to run any of the examples in >> qtwebengine\examples\webenginewidgets the program crashes and I see >> the following in debug.log: >> >> [0207/153930:FATAL:icu_util.cc(230)] Check failed: result. > > This AFAIR means that Qt WebEngine couldn't locate icudtl.dat . That file should be automatically generated when compiling qtwebengine, and should be available under QT_INSTALL_DATA. > >> How do I run these examples (fancybrowser, demobrowser or >> markdowneditor)? >> >> This is with Qt 5.6 beta that I have built from source on Windows 7 using >> the Visual Studio 2015 command line tools with: >> .\configure.bat -prefix %CD%\qtbase -make-tool jom -nomake tests - >> opensource -confirm-license -release > > You might need to run nmake install from within qtwebengine module. (This will be fixed in the 5.6 RC). Doing this did fix the issue, thanks. Glenn From kshegunov at gmail.com Tue Feb 9 08:39:04 2016 From: kshegunov at gmail.com (Nye) Date: Tue, 9 Feb 2016 09:39:04 +0200 Subject: [Interest] Missing private header(s) Message-ID: Hello, I wish to implement my own event dispatcher, so I derived from QAbstractEventDispatcher. As usual with PIMPL I'd derive my private object from QAbstractEventDispatcherPrivate and pass it to the public class' constructor. Unfortunately, even with QT += core-private I don't have the "qabstracteventdispatcher_p.h" header available. Is this file's absence a miss of the build system, or am I doing something wrongly? Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Tue Feb 9 08:57:45 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 08 Feb 2016 23:57:45 -0800 Subject: [Interest] Missing private header(s) In-Reply-To: References: Message-ID: <1965242.fCLCKk2uPO@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 09:39:04 PST Nye wrote: > Hello, > I wish to implement my own event dispatcher, so I derived from > QAbstractEventDispatcher. As usual with PIMPL I'd derive my private object > from QAbstractEventDispatcherPrivate and pass it to the public class' > constructor. Unfortunately, even with QT += core-private I don't have the > "qabstracteventdispatcher_p.h" header available. Is this file's absence a > miss of the build system, or am I doing something wrongly? How did you install Qt? Your installation is missing some files. Also, note that you do not need the private API to implement your own dispatcher. You should not use QAbstractEventDispatcherPrivate. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From kshegunov at gmail.com Tue Feb 9 09:20:58 2016 From: kshegunov at gmail.com (Nye) Date: Tue, 9 Feb 2016 10:20:58 +0200 Subject: [Interest] Missing private header(s) In-Reply-To: <1965242.fCLCKk2uPO@tjmaciei-mobl4> References: <1965242.fCLCKk2uPO@tjmaciei-mobl4> Message-ID: I'd built it (5.6) from the repo, however everything is fine and the file exists, it was an include path issue, sorry. *blush* I know I don't have to use the private API, but this would imply I'll be dragging along additional (private) objects for my derived classes (which include QCoreApplication, QAbstractEventDispatcher, QObject and so on). I'm aware of the implications of using the private API, but at this point I'm willing to suffer through them. Thanks for the help! On Tue, Feb 9, 2016 at 9:57 AM, Thiago Macieira wrote: > On terça-feira, 9 de fevereiro de 2016 09:39:04 PST Nye wrote: > > Hello, > > I wish to implement my own event dispatcher, so I derived from > > QAbstractEventDispatcher. As usual with PIMPL I'd derive my private > object > > from QAbstractEventDispatcherPrivate and pass it to the public class' > > constructor. Unfortunately, even with QT += core-private I don't have the > > "qabstracteventdispatcher_p.h" header available. Is this file's absence a > > miss of the build system, or am I doing something wrongly? > > How did you install Qt? Your installation is missing some files. > > Also, note that you do not need the private API to implement your own > dispatcher. You should not use QAbstractEventDispatcherPrivate. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boris at codesynthesis.com Tue Feb 9 09:53:59 2016 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue, 9 Feb 2016 08:53:59 +0000 (UTC) Subject: [Interest] [ANN] build2 - C++ build toolchain References: Message-ID: Hi Diego, Diego Iastrubni writes: > But can it handle Qt code..? resources...? UI...? It is a general-purpose build system so it can (or will be able to) handle this. > "moc"? Yes, auto-generated source code was one of the higher priority items for us. Higher than Windows ;-). > Does it work on Windows? Not yet but it will (cross-compiling to Windows is already supported). Boris From diegoiast at gmail.com Tue Feb 9 10:04:02 2016 From: diegoiast at gmail.com (Diego Iastrubni) Date: Tue, 9 Feb 2016 11:04:02 +0200 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: <4521063.hzVPsqVzBg@tjmaciei-mobl4> References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote: > > qmake's philosophy is "assume everything is there and just use it". It's > meant > mostly for using Qt itself, so you can be sure that all of it is present. > If > you use third-party libraries and they're not present, you'll get a > compilation error somewhere. Yes, right. That is why I am probably barking at the wrong tree. I need CMake support only. Integrating 3rd party software into Java/ObjC/Swift code is trivial, there are lots of project handling this. Its very sad that in 2016 we still don't have something like that can help integrating 3rd party libraries into my C++ code. I have been looking inside QtCreator and Subsurface to look "how the grown ups are doing this" and it seems that those projects are just recreating the build system internally in qmake. I tried doing the same for 2 libraries (libetpan and mailcore) and it was a pain. How do you guys integrate 3rd party libraries into your code? Feel free to tell me I am going too off-topic for this list is this is the case. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeanmichael.celerier at gmail.com Tue Feb 9 15:08:11 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Tue, 9 Feb 2016 15:08:11 +0100 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: On Tue, Feb 9, 2016 at 10:04 AM, Diego Iastrubni wrote: > > Integrating 3rd party software into Java/ObjC/Swift code is trivial, there > are lots of project handling this. Its very sad that in 2016 we still don't > have something like that can help integrating 3rd party libraries into my > C++ code. > > It's not realistic if you don't want to have terrible first-time build times. Imagine an application that uses Qt with QWebEngine and QML, boost, and some other libraries, on an average computer it would be at least thirty minutes to build all the dependencies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.mironchik at gmail.com Tue Feb 9 16:26:27 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Tue, 9 Feb 2016 18:26:27 +0300 Subject: [Interest] QGraphicsTextItem & editing Message-ID: <56BA0523.8000908@gmail.com> Hi, I create QGraphicsTextItem and setTextInteractionFlags( Qt::TextEditorInteraction ), but text is not editable, I don't see cursor, etc... How to start editing in QGraphicsTextItem? Thank you. From pr12og2 at programist.ru Tue Feb 9 16:31:54 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 18:31:54 +0300 Subject: [Interest] QWidget style change and reverting it back Message-ID: <726335071.20160209183154@programist.ru> I am trying to change color of QLineEdit with ui->lineEdit->setStyleSheet("color: red;"); How that could be that doing the same thing second time I got changed size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. And how to make lineEdit look as it was before using it's setStyleSheet() method? ui->lineEdit->setStyleSheet(""); does not work for me. Or using setStyleSheet() is irreversible operation? If so how to change color of widget and then return it back. From thiago.macieira at intel.com Tue Feb 9 16:38:58 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 07:38:58 -0800 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: <2386296.PMah1STo4g@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 11:04:02 PST Diego Iastrubni wrote: > How do you guys integrate 3rd party libraries into your code? Integrate the buildsystem. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Tue Feb 9 16:41:41 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 07:41:41 -0800 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: Message-ID: <5662874.jyhbqGfI41@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 15:08:11 PST Jean-Michaël Celerier wrote: > Imagine an application that uses Qt with QWebEngine and QML, boost, and > some other libraries, on an average computer it would be at least thirty > minutes to build all the dependencies. You're being generous. For an "average" computer running Windows with its slow filesystems, it would be a couple of hours, possibly a lot more if it needs to download and build Perl, Python and Ruby in order to build the web engine (Ninja, etc.). Remember the flame-war we had in this mailing list when I proposed making Perl mandatory for compiling Qt? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Tue Feb 9 16:47:54 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 07:47:54 -0800 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <726335071.20160209183154@programist.ru> References: <726335071.20160209183154@programist.ru> Message-ID: <6993794.ZdIunlXAQM@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 18:31:54 PST Prav wrote: > I am trying to change color of QLineEdit with > > ui->lineEdit->setStyleSheet("color: red;"); Why didn't you just set the colour, by changing the widget's palette? > > How that could be that doing the same thing second time I got changed > size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. > > > And how to make lineEdit look as it was before using it's setStyleSheet() > method? ui->lineEdit->setStyleSheet(""); > does not work for me. > > Or using setStyleSheet() is irreversible operation? > If so how to change color of widget and then return it back. It has an irreversible consequence, that of using QStyleSheetStyle for the widget's style, instead of whatever is the default for your platform (in case of a modern Windows, that's QWindowsVistaStyle, provided in the windows.dll platform plugin). The QStyleSheetStyle class is supposed to mimic the platform's style, but it exists in the first place in order to do things that are not possible with the platform's style. So if you use stylesheets, you *accept* that your widget will look different from the platform. That is not a bug. What's more, changing the style implies you don't want to look like the native look and feel anyway. We can say there's room for improvement, though. See https://bugreports.qt.io/ browse/QTBUG-50976 for an example. My personal recommendation: don't use style sheets, at all. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From igor.mironchik at gmail.com Tue Feb 9 17:03:33 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Tue, 9 Feb 2016 19:03:33 +0300 Subject: [Interest] QGraphicsTextItem & editing In-Reply-To: <56BA0523.8000908@gmail.com> References: <56BA0523.8000908@gmail.com> Message-ID: <56BA0DD5.7020405@gmail.com> On 09.02.2016 18:26, Igor Mironchik wrote: > Hi, > > I create QGraphicsTextItem and setTextInteractionFlags( > Qt::TextEditorInteraction ), but text is not editable, I don't see > cursor, etc... > > How to start editing in QGraphicsTextItem? I got one point - setTextInteractionFlags( Qt::TextEditorInteraction ) should be invoked after constructing of QGraphicsTextItem. Now Item has flashing cursor, but no text input focus, i.e. keys do nothing. setFocus() doesn't help... What can be the problem? From igor.mironchik at gmail.com Tue Feb 9 17:19:43 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Tue, 9 Feb 2016 19:19:43 +0300 Subject: [Interest] QGraphicsTextItem & editing In-Reply-To: <56BA0DD5.7020405@gmail.com> References: <56BA0523.8000908@gmail.com> <56BA0DD5.7020405@gmail.com> Message-ID: <56BA119F.4020200@gmail.com> On 09.02.2016 19:03, Igor Mironchik wrote: > > > On 09.02.2016 18:26, Igor Mironchik wrote: >> Hi, >> >> I create QGraphicsTextItem and setTextInteractionFlags( >> Qt::TextEditorInteraction ), but text is not editable, I don't see >> cursor, etc... >> >> How to start editing in QGraphicsTextItem? > > I got one point - setTextInteractionFlags( Qt::TextEditorInteraction ) > should be invoked after constructing of QGraphicsTextItem. Now Item > has flashing cursor, but no text input focus, i.e. keys do nothing. > > setFocus() doesn't help... > > What can be the problem? Got it, my scene eat key press events... :) Thank you and sorry for the flood. From igor.mironchik at gmail.com Tue Feb 9 18:00:59 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Tue, 9 Feb 2016 20:00:59 +0300 Subject: [Interest] QGraphicsTextItem & editing In-Reply-To: <56BA0DCF.2040906@gmail.com> References: <56BA0523.8000908@gmail.com> <56BA0DCF.2040906@gmail.com> Message-ID: <56BA1B4B.3000104@gmail.com> On 09.02.2016 19:03, Igor Mironchik wrote: > > > On 09.02.2016 18:26, Igor Mironchik wrote: >> Hi, >> >> I create QGraphicsTextItem and setTextInteractionFlags( >> Qt::TextEditorInteraction ), but text is not editable, I don't see >> cursor, etc... >> >> How to start editing in QGraphicsTextItem? > > I got one point - setTextInteractionFlags( Qt::TextEditorInteraction ) > should be invoked after constructing... My mistake... setTextInteractionFlags( Qt::TextEditorInteraction ) can be invoked in c_tor... :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From aclight at gmail.com Tue Feb 9 19:12:37 2016 From: aclight at gmail.com (Adam Light) Date: Tue, 9 Feb 2016 10:12:37 -0800 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <6993794.ZdIunlXAQM@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> Message-ID: On Tue, Feb 9, 2016 at 7:47 AM, Thiago Macieira wrote: > On terça-feira, 9 de fevereiro de 2016 18:31:54 PST Prav wrote: > > I am trying to change color of QLineEdit with > > > > ui->lineEdit->setStyleSheet("color: red;"); > > Why didn't you just set the colour, by changing the widget's palette? > > For what it's worth, I have always interpreted the following excerpt from http://doc.qt.io/qt-5/qwidget.html#palette-prop as implying that in a situation like this, setting the style sheet is the "right" thing to do: "The current style, which is used to render the content of all standard Qt widgets, is free to choose colors and brushes from the widget palette, or in some cases, to ignore the palette (partially, or completely). In particular, certain styles like GTK style, Mac style, Windows XP, and Vista style, depend on third party APIs to render the content of widgets, and these styles typically do not follow the palette. Because of this, assigning roles to a widget's palette is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a styleSheet. You can refer to our Knowledge Base article here for more information." The linked Knowledge Base article is a dead link. Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From konstantin at podsvirov.pro Tue Feb 9 19:33:43 2016 From: konstantin at podsvirov.pro (Konstantin Podsvirov) Date: Tue, 09 Feb 2016 21:33:43 +0300 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: <641781455042823@web29j.yandex.ru> 09.02.2016, 12:04 PM, "Diego Iastrubni" : > How do you guys integrate 3rd party libraries into your code? CMake forever! :-) -- Regards, Konstantin Podsvirov From pr12og2 at programist.ru Tue Feb 9 19:48:26 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 21:48:26 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <6993794.ZdIunlXAQM@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> Message-ID: <627820099.20160209214826@programist.ru> Hello, Thiago. Thanks for explanations! But I did get clear overall picture yet. >> I am trying to change color of QLineEdit with >> ui->lineEdit->setStyleSheet("color: red;"); > Why didn't you just set the colour, by changing the widget's palette? I was expecting this is the same ... but this way seemed for me to be more easy to extend ... I mean easy to edit to add more specifications Now I get that calling setStyleSheet("color: red;") is not done via calling setPalette(). >> How that could be that doing the same thing second time I got changed >> size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. I did not get reason for this behavior. Let me explain it again. If I press button second time I see that lineEdit changes its size? BUT ... from external point of view it looks like the same property was set to the same value again! That second call changes something? Style? Then this mean that first call did done the job totally. This all looks kind of magic for me ... or at least strange/unexpected behavior IMHO. >> Or using setStyleSheet() is irreversible operation? > It has an irreversible consequence, that of using QStyleSheetStyle for the > widget's style, instead of whatever is the default for your platform. I got the idea about role of QStyleSheetStyle and it make sense. I did not get why style manipulations are made irreversible? I was thinking that there is some king of property of widget that stores style (or style*). How changing the value of this property could be irreversible? Why this property can not be set to whatever it was (this is meaning of irreversible for me)? > The QStyleSheetStyle class is supposed to mimic the > platform's style, but it exists in the first place in order to do things that > are not possible with the platform's style. OK ... how one can understand which properties of style-sheet language are "possible with the platform's style" (to be able to avoid this bad-mimic behaviour of QStyleSheetStyle class as much as possible)? > So if you use stylesheets, you *accept* that your widget will look different > from the platform. That is not a bug. What's more, changing the style implies > you don't want to look like the native look and feel anyway. OK ... so QStyleSheetStyle is mimicing ... but not good ... only for now or there is no such goal to make QStyleSheetStyle look the same as app's style (QWindowsVistaStyle)? I did not get ... are there some sort of big difficulties for QStyleSheetStyle("") to look the same as QWindowsVistaStyle? I can imagine that QWindowsVistaStyle is not easy to implement but if implemented why it can not be used to work for other classed like QStyleSheetStyle? > We can say there's room for improvement, though. See https://bugreports.qt.io/ > browse/QTBUG-50976 for an example. Yes ... this is funny behavior too :) > My personal recommendation: don't use style sheets, at all. There is several big help-docs I read about this style-language ... but now it seems to be not recommended ... such a pity :( >> If so how to change color of widget and then return it back. Let me ask this question in more generous way: How to revert the look-and-feel of widget back as it was before I start touching any look-and-feel properties of widget? From diegoiast at gmail.com Tue Feb 9 21:20:23 2016 From: diegoiast at gmail.com (Diego Iastrubni) Date: Tue, 9 Feb 2016 22:20:23 +0200 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: <641781455042823@web29j.yandex.ru> References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> <641781455042823@web29j.yandex.ru> Message-ID: While I agree... this still does not help me with a 3rd party code, which has a CMakeFiles.txt inside. How can I tell me CMakeFiles.txt - "see this subdir? now do include it, and make it part of your project". On Tue, Feb 9, 2016 at 8:33 PM, Konstantin Podsvirov < konstantin at podsvirov.pro> wrote: > 09.02.2016, 12:04 PM, "Diego Iastrubni" : > > > How do you guys integrate 3rd party libraries into your code? > > CMake forever! :-) > > -- > Regards, > Konstantin Podsvirov > -------------- next part -------------- An HTML attachment was scrubbed... URL: From suy at badopi.org Tue Feb 9 21:52:53 2016 From: suy at badopi.org (Alejandro Exojo) Date: Tue, 9 Feb 2016 21:52:53 +0100 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: <201602092152.53524.suy@badopi.org> El Tuesday 09 February 2016, Diego Iastrubni escribió: > Integrating 3rd party software into Java/ObjC/Swift code is trivial, there > are lots of project handling this. Its very sad that in 2016 we still don't > have something like that can help integrating 3rd party libraries into my > C++ code. Have you seen my other email? I've mentioned two. And if that's not enough: http://www.biicode.com/ Those _exist_, and are not specially popular because are a lot younger than CPAN, Gems, npm, etc. And because the case is different, IMHO. But there is "something that can help". At least a bit. ;) -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net From imikejackson at gmail.com Tue Feb 9 23:28:41 2016 From: imikejackson at gmail.com (Mike Jackson) Date: Tue, 09 Feb 2016 17:28:41 -0500 Subject: [Interest] Displaying Help from QHelpEngine through QWebEngine Message-ID: <56BA6819.1020602@gmail.com> I am attempting to use the QHelp* classes to allow our users to search our help files (html based) using the same mechanisms as those used with QAssistant. So far I have hacked together the major pieces and hooked everything up. I am able to manually generate a .qhc file from all of our html and image sources. I got so far as to enter a search string and have the relevant documents appear in the results widget. Now when I click on a link I would like to actually display the help. Currently we use QWebEngineView on Qt 5.5.1 because QWebKit was being deprecated. I am pretty sure the issue as to why nothing is displayed is because I get a URL like the following: "qthelp://bluequartzsoftware.net.dream3d.1.0/DREAM3D/addorientationnoise.html" and QWebEngine probably has no idea what to do with that URL scheme. I have looked around the internet using Google and while other people are asking this same question there are no actual answers. About the only possibility seems to get the file contents from the HelpEngine along with any CSS and Image assets, write all of those to a temp location on the filesystem, then load the URL from the temp location? There must be an easier way that I am just missing. Any help is greatly appreciated. -- Mike Jackson BlueQuartz Software -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Wed Feb 10 00:19:39 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 15:19:39 -0800 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> Message-ID: <13479606.RjvK4RtWzy@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 10:12:37 PST Adam Light wrote: > For what it's worth, I have always interpreted the following excerpt from > http://doc.qt.io/qt-5/qwidget.html#palette-prop as implying that in a > situation like this, setting the style sheet is the "right" thing to do: > > "The current style, which is used to render the content of all standard Qt > widgets, is free to choose colors and brushes from the widget palette, or > in some cases, to ignore the palette (partially, or completely). In > particular, certain styles like GTK style, Mac style, Windows XP, and Vista > style, depend on third party APIs to render the content of widgets, and > these styles typically do not follow the palette. Because of this, > assigning roles to a widget's palette is not guaranteed to change the > appearance of the widget. Instead, you may choose to apply a styleSheet. > You can refer to our Knowledge Base article here for more information." And now you know why. In order to set the colour, it stops using the actual widget style and falls back to QWindowsStyle. That has other consequences. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Wed Feb 10 00:21:43 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 15:21:43 -0800 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <627820099.20160209214826@programist.ru> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> <627820099.20160209214826@programist.ru> Message-ID: <3437386.gIizzNcFU3@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 21:48:26 PST Prav wrote: > > The QStyleSheetStyle class is supposed to mimic the > > platform's style, but it exists in the first place in order to do things > > that are not possible with the platform's style. > > OK ... how one can understand which properties of style-sheet language are > "possible with the platform's style" (to be able to avoid this bad-mimic > behaviour of QStyleSheetStyle class as much as possible)? Assume that whenever you use stylesheets, your widgets may look completely different from what it would otherwise look. As I said, you're using style sheets BECAUSE you want to have an alien (non- native) look and feel. So accept they will look different. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Wed Feb 10 00:22:24 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 09 Feb 2016 15:22:24 -0800 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <641781455042823@web29j.yandex.ru> Message-ID: <1889875.FhzZEztGZK@tjmaciei-mobl4> On terça-feira, 9 de fevereiro de 2016 22:20:23 PST Diego Iastrubni wrote: > While I agree... this still does not help me with a 3rd party code, which > has a CMakeFiles.txt inside. > > How can I tell me CMakeFiles.txt - "see this subdir? now do include it, and > make it part of your project". If it has a CMakeFiles.txt inside, you just need to add_subdir() the subdir. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From steveire at gmail.com Wed Feb 10 00:48:08 2016 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 10 Feb 2016 00:48:08 +0100 Subject: [Interest] [ANN] build2 - C++ build toolchain References: <641781455042823@web29j.yandex.ru> <1889875.FhzZEztGZK@tjmaciei-mobl4> Message-ID: Thiago Macieira wrote: > On terça-feira, 9 de fevereiro de 2016 22:20:23 PST Diego Iastrubni wrote: >> While I agree... this still does not help me with a 3rd party code, which >> has a CMakeFiles.txt inside. >> >> How can I tell me CMakeFiles.txt - "see this subdir? now do include it, >> and make it part of your project". > > If it has a CMakeFiles.txt inside, you just need to add_subdir() the > subdir. This isn't really true. It depends on the 3rd party planning for being used like that and being implemented appropriately. There are other ways, but further discussion belongs on the cmake list anyway. Thanks, Steve. From kde at carewolf.com Wed Feb 10 01:00:05 2016 From: kde at carewolf.com (Allan Sandfeld Jensen) Date: Wed, 10 Feb 2016 01:00:05 +0100 Subject: [Interest] Displaying Help from QHelpEngine through QWebEngine In-Reply-To: <56BA6819.1020602@gmail.com> References: <56BA6819.1020602@gmail.com> Message-ID: <201602100100.05280.kde@carewolf.com> On Tuesday 09 February 2016, Mike Jackson wrote: > I am attempting to use the QHelp* classes to allow our users to search > our help files (html based) using the same mechanisms as those used with > QAssistant. So far I have hacked together the major pieces and hooked > everything up. I am able to manually generate a .qhc file from all of > our html and image sources. I got so far as to enter a search string and > have the relevant documents appear in the results widget. Now when I > click on a link I would like to actually display the help. Currently we > use QWebEngineView on Qt 5.5.1 because QWebKit was being deprecated. I > am pretty sure the issue as to why nothing is displayed is because I get > a URL like the following: > > > "qthelp://bluequartzsoftware.net.dream3d.1.0/DREAM3D/addorientationnoise.ht > ml" > > > and QWebEngine probably has no idea what to do with that URL scheme. I > have looked around the internet using Google and while other people are > asking this same question there are no actual answers. About the only > possibility seems to get the file contents from the HelpEngine along > with any CSS and Image assets, write all of those to a temp location on > the filesystem, then load the URL from the temp location? There must be > an easier way that I am just missing. > > > Any help is greatly appreciated. What you need is the QWebEngineUrlSchemeHandler which was added in Qt 5.6. It adds the ability to add custom URL schemes to QtWebEngine. Best regards `Allan Jensen From imikejackson at gmail.com Wed Feb 10 02:05:21 2016 From: imikejackson at gmail.com (Mike Jackson) Date: Tue, 09 Feb 2016 20:05:21 -0500 Subject: [Interest] Displaying Help from QHelpEngine through QWebEngine In-Reply-To: <201602100100.05280.kde@carewolf.com> References: <56BA6819.1020602@gmail.com> <201602100100.05280.kde@carewolf.com> Message-ID: <56BA8CD1.2090802@gmail.com> I went looking through the QAssistant sources but could not really follow what was going on. The best that I could tell is maybe there is a custom Network handler that qthelp:// uses. Kind of like a super lightweight "server" that QWebKit talks to when requesting URLs that are stored in the .qhc file? We were going to eventually move to Qt 5.6 when it is officially released. Just seems odd that Qt has you package up your files into a SQLite data base but then offers no convenient way of actually displaying that content to the user. Odd. For now what I think we are going to do is to ship both the loose html files and the .qhc file. We can use the .qhc for full text searching but use the loose .html files for display. Seems to work, just did not really want to ship 2x sets of the docs. Thanks for the heads up about Qt 5.6 Mike Jackson > Allan Sandfeld Jensen > February 9, 2016 at 7:00 PMvia Postbox > > > What you need is the QWebEngineUrlSchemeHandler which was added in Qt > 5.6. It > adds the ability to add custom URL schemes to QtWebEngine. > > Best regards > `Allan Jensen > Mike Jackson > February 9, 2016 at 5:28 PMvia Postbox > > I am attempting to use the QHelp* classes to allow our users to search > our help files (html based) using the same mechanisms as those used > with QAssistant. So far I have hacked together the major pieces and > hooked everything up. I am able to manually generate a .qhc file from > all of our html and image sources. I got so far as to enter a search > string and have the relevant documents appear in the results widget. > Now when I click on a link I would like to actually display the help. > Currently we use QWebEngineView on Qt 5.5.1 because QWebKit was being > deprecated. I am pretty sure the issue as to why nothing is displayed > is because I get a URL like the following: > > > "qthelp://bluequartzsoftware.net.dream3d.1.0/DREAM3D/addorientationnoise.html" > > > and QWebEngine probably has no idea what to do with that URL scheme. I > have looked around the internet using Google and while other people > are asking this same question there are no actual answers. About the > only possibility seems to get the file contents from the HelpEngine > along with any CSS and Image assets, write all of those to a temp > location on the filesystem, then load the URL from the temp location? > There must be an easier way that I am just missing. > > > Any help is greatly appreciated. > > -- Michael A. Jackson 400 S. Pioneer Blvd Owner, President Springboro, Ohio 45066 BlueQuartz Software, LLC EMail: mike.jackson at bluequartz.net Voice: 937-806-1165 Web: http://www.bluequartz.net Fax: 937-746-0783 -------------- next part -------------- An HTML attachment was scrubbed... URL: From konstantin at podsvirov.pro Wed Feb 10 04:43:28 2016 From: konstantin at podsvirov.pro (Konstantin Podsvirov) Date: Wed, 10 Feb 2016 06:43:28 +0300 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <641781455042823@web29j.yandex.ru> <1889875.FhzZEztGZK@tjmaciei-mobl4> Message-ID: <2420491455075808@web11h.yandex.ru> 10.02.2016, 02:50, "Stephen Kelly" : > Thiago Macieira wrote: > >> On Tuesday-feira, 9 de fevereiro de 2016 22:20:23 PST Diego Iastrubni wrote: >>> While I agree... this still does not help me with a 3rd party code, which >>> has a CMakeFiles.txt inside. >>> >>> How can I tell me CMakeFiles.txt - "see this subdir? now do include it, >>> and make it part of your project". >> >> If it has a CMakeFiles.txt inside, you just need to add_subdir() the >> subdir. > > This isn't really true. It depends on the 3rd party planning for being used > like that and being implemented appropriately. In General, this is true. But CMake is worth a try, that would be in love with him. My experience is limited, but CMake is the best tool for me right now, which perfectly complements the C and C++ (and others) in various application aspects and artifacts of the development process of large modular projects. > There are other ways, but further discussion belongs on the cmake list > anyway. Yes. CMake has some barrier to entry, but its worth a try. And the Qt project provides great support CMake, how to use the frame (export modules), and support Qt Creator IDE. > Thanks, > > Steve. The main thing I wanted to say: a) to Build the dependent libraries from source code within your project is in General not good. b) it is Necessary to strive for a modular design and independent building of modules and their exports and imports. Regards, Konstantin Podsvirov From pr12og2 at programist.ru Wed Feb 10 09:24:19 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 11:24:19 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <3437386.gIizzNcFU3@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> <627820099.20160209214826@programist.ru> <3437386.gIizzNcFU3@tjmaciei-mobl4> Message-ID: <509671482.20160210112419@programist.ru> >> > The QStyleSheetStyle class is supposed to mimic the >> > platform's style, but it exists in the first place in order to do things >> > that are not possible with the platform's style. >> >> OK ... how one can understand which properties of style-sheet language are >> "possible with the platform's style" (to be able to avoid this bad-mimic >> behaviour of QStyleSheetStyle class as much as possible)? > Assume that whenever you use stylesheets, your widgets may look completely > different from what it would otherwise look. > As I said, you're using style sheets BECAUSE you want to have an alien (non- > native) look and feel. So accept they will look different. I think here is the main difference in your thinking about usefulness of style sheets: One may want to use style sheets not because "you're using style sheets BECAUSE you want to have an alien" BUT because "it is easy to understand and change". And both ways can be possible IF QStyleSheetStyle would not look like an alien. Who wanted to get all things as needed would specify all properties like needed and those who want to change only couple of properties would do only this. Even in docs (http://doc.qt.io/qt-5/stylesheet.html) this idea of QStyleSheetStyle to be like platform-specific style is specified. "The wrapper style [here meant what is returned by QWidget::style() after applying setStyleSheet() to widget] ensures that any active style sheet is respected and otherwise forwards the drawing operations to the underlying, platform-specific style" So I would say that to be an "alien" is not the value for thous who want to use setSetyleSheets(). From pr12og2 at programist.ru Wed Feb 10 10:12:05 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 12:12:05 +0300 Subject: [Interest] x-platform way to pull app version? In-Reply-To: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> References: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> Message-ID: <1078105723.20160210121205@programist.ru> > On Monday 01 February 2016 20:20:51 André Somers wrote: >> Easiest is to let your buildsystem generate some cpp code with the version >> numbers in each build. We compiled in version number, git id an time & date >> with a simple script called from qmake on every build. > Note that it's a bad idea to embed the time and date. A build from the exact > same sources should produce the exact same binary. But problem exist already many decades even if I want to get same binary I can not! This is because simple compilation produces DIFFERENT binaries (at least on Windows) while executing sequentially two times on same machine ... even for console application with void main() {} source code. Here is the real result: Comparing files D:\test1.exe and D:\test2.exe 000000E0: 02 08 Here test1.exe and test2.exe are result of building "void main() {}" source code two times Funny?! :) From pr12og2 at programist.ru Wed Feb 10 11:19:04 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 13:19:04 +0300 Subject: [Interest] IDE used to develop qt library In-Reply-To: <1637499.9JIWdWlD1O@tjmaciei-mobl4> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> Message-ID: <413643843.20160210131904@programist.ru> >> I just wonder what kind of IDE do you use to develop the qt library itself. > Qt Creator. >> I didn't find any qtcreator files in the source. What do tools do you use >> for development and browsing the code? > Qt Creator can read the *.pro files. And? For example ... there is no such project like "qt", "qtcore" or "_build_qtlib" "_build_examples" and "_build_tests" while qt.pro is opened in QtCreator ... BUT there are like hundreds! of subprojects. So how to start? How people will going to start adding value to Qt IF entry-level to start programming for Qt in typical programmers environments is made so high?! And moreover it is not clear what else need to be done before opening qt.pro file in QtCreator. From annulen at yandex.ru Wed Feb 10 11:26:09 2016 From: annulen at yandex.ru (Konstantin Tokarev) Date: Wed, 10 Feb 2016 13:26:09 +0300 Subject: [Interest] IDE used to develop qt library In-Reply-To: <413643843.20160210131904@programist.ru> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> <413643843.20160210131904@programist.ru> Message-ID: <4456021455099969@web29m.yandex.ru> 10.02.2016, 13:18, "Prav" : >>>  I just wonder what kind of IDE do you use to develop the qt library itself. >>  Qt Creator. > >>>  I didn't find any qtcreator files in the source. What do tools do you use >>>  for development and browsing the code? >>  Qt Creator can read the *.pro files. > > And? > > For example ... there is no such project like "qt", "qtcore" or "_build_qtlib" "_build_examples" > and "_build_tests" while qt.pro is opened in QtCreator ... BUT there are like hundreds! of subprojects. > So how to start? > > How people will going to start adding value to Qt IF entry-level to start programming > for Qt in typical programmers environments is made so high?! > > And moreover it is not clear what else need to be done before opening qt.pro file in QtCreator. http://wiki.qt.io/Building_Qt_5_from_Git -- Regards, Konstantin From public at enkore.de Wed Feb 10 13:03:10 2016 From: public at enkore.de (public at enkore.de) Date: Wed, 10 Feb 2016 13:03:10 +0100 Subject: [Interest] IDE used to develop qt library In-Reply-To: <413643843.20160210131904@programist.ru> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> <413643843.20160210131904@programist.ru> Message-ID: <56BB26FE.4070706@enkore.de> On 10.02.2016 11:19, Prav wrote: > How people will going to start adding value to Qt IF entry-level to start programming > for Qt in typical programmers environments is made so high?! I consider myself an average programmer and I had few issues contributing patches to Qt libraries I never worked on (!= with) before. The process is documented quite well in the wiki, the code is well organized and readable. Specific questions will be answered on the lists, forums or IRC, while specific issues with your patches will be discussed in code review. I don't intend to be dismissive here - I just think that there is almost everything laid out for getting started. Cheers, Marian From pr12og2 at programist.ru Tue Feb 9 19:48:26 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 21:48:26 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <6993794.ZdIunlXAQM@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> Message-ID: <627820099.20160209214826@programist.ru> Hello, Thiago. Thanks for explanations! But I did get clear overall picture yet. >> I am trying to change color of QLineEdit with >> ui->lineEdit->setStyleSheet("color: red;"); > Why didn't you just set the colour, by changing the widget's palette? I was expecting this is the same ... but this way seemed for me to be more easy to extend ... I mean easy to edit to add more specifications Now I get that calling setStyleSheet("color: red;") is not done via calling setPalette(). >> How that could be that doing the same thing second time I got changed >> size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. I did not get reason for this behavior. Let me explain it again. If I press button second time I see that lineEdit changes its size? BUT ... from external point of view it looks like the same property was set to the same value again! That second call changes something? Style? Then this mean that first call did done the job totally. This all looks kind of magic for me ... or at least strange/unexpected behavior IMHO. >> Or using setStyleSheet() is irreversible operation? > It has an irreversible consequence, that of using QStyleSheetStyle for the > widget's style, instead of whatever is the default for your platform. I got the idea about role of QStyleSheetStyle and it make sense. I did not get why style manipulations are made irreversible? I was thinking that there is some king of property of widget that stores style (or style*). How changing the value of this property could be irreversible? Why this property can not be set to whatever it was (this is meaning of irreversible for me)? > The QStyleSheetStyle class is supposed to mimic the > platform's style, but it exists in the first place in order to do things that > are not possible with the platform's style. OK ... how one can understand which properties of style-sheet language are "possible with the platform's style" (to be able to avoid this bad-mimic behaviour of QStyleSheetStyle class as much as possible)? > So if you use stylesheets, you *accept* that your widget will look different > from the platform. That is not a bug. What's more, changing the style implies > you don't want to look like the native look and feel anyway. OK ... so QStyleSheetStyle is mimicing ... but not good ... only for now or there is no such goal to make QStyleSheetStyle look the same as app's style (QWindowsVistaStyle)? I did not get ... are there some sort of big difficulties for QStyleSheetStyle("") to look the same as QWindowsVistaStyle? I can imagine that QWindowsVistaStyle is not easy to implement but if implemented why it can not be used to work for other classed like QStyleSheetStyle? > We can say there's room for improvement, though. See https://bugreports.qt.io/ > browse/QTBUG-50976 for an example. Yes ... this is funny behavior too :) > My personal recommendation: don't use style sheets, at all. There is several big help-docs I read about this style-language ... but now it seems to be not recommended ... such a pity :( >> If so how to change color of widget and then return it back. Let me ask this question in more generous way: How to revert the look-and-feel of widget back as it was before I start touching any look-and-feel properties of widget? From pr12og2 at programist.ru Wed Feb 10 11:19:04 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 13:19:04 +0300 Subject: [Interest] IDE used to develop qt library In-Reply-To: <1637499.9JIWdWlD1O@tjmaciei-mobl4> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> Message-ID: <413643843.20160210131904@programist.ru> >> I just wonder what kind of IDE do you use to develop the qt library itself. > Qt Creator. >> I didn't find any qtcreator files in the source. What do tools do you use >> for development and browsing the code? > Qt Creator can read the *.pro files. And? For example ... there is no such project like "qt", "qtcore" or "_build_qtlib" "_build_examples" and "_build_tests" while qt.pro is opened in QtCreator ... BUT there are like hundreds! of subprojects. So how to start? How people will going to start adding value to Qt IF entry-level to start programming for Qt in typical programmers environments is made so high?! And moreover it is not clear what else need to be done before opening qt.pro file in QtCreator. From pr12og2 at programist.ru Tue Feb 9 16:31:54 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 18:31:54 +0300 Subject: [Interest] QWidget style change and reverting it back Message-ID: <726335071.20160209183154@programist.ru> I am trying to change color of QLineEdit with ui->lineEdit->setStyleSheet("color: red;"); How that could be that doing the same thing second time I got changed size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. And how to make lineEdit look as it was before using it's setStyleSheet() method? ui->lineEdit->setStyleSheet(""); does not work for me. Or using setStyleSheet() is irreversible operation? If so how to change color of widget and then return it back. From pr12og2 at programist.ru Wed Feb 10 09:24:19 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 11:24:19 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <3437386.gIizzNcFU3@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> <627820099.20160209214826@programist.ru> <3437386.gIizzNcFU3@tjmaciei-mobl4> Message-ID: <509671482.20160210112419@programist.ru> >> > The QStyleSheetStyle class is supposed to mimic the >> > platform's style, but it exists in the first place in order to do things >> > that are not possible with the platform's style. >> >> OK ... how one can understand which properties of style-sheet language are >> "possible with the platform's style" (to be able to avoid this bad-mimic >> behaviour of QStyleSheetStyle class as much as possible)? > Assume that whenever you use stylesheets, your widgets may look completely > different from what it would otherwise look. > As I said, you're using style sheets BECAUSE you want to have an alien (non- > native) look and feel. So accept they will look different. I think here is the main difference in your thinking about usefulness of style sheets: One may want to use style sheets not because "you're using style sheets BECAUSE you want to have an alien" BUT because "it is easy to understand and change". And both ways can be possible IF QStyleSheetStyle would not look like an alien. Who wanted to get all things as needed would specify all properties like needed and those who want to change only couple of properties would do only this. Even in docs (http://doc.qt.io/qt-5/stylesheet.html) this idea of QStyleSheetStyle to be like platform-specific style is specified. "The wrapper style [here meant what is returned by QWidget::style() after applying setStyleSheet() to widget] ensures that any active style sheet is respected and otherwise forwards the drawing operations to the underlying, platform-specific style" So I would say that to be an "alien" is not the value for thous who want to use setSetyleSheets(). From pr12og2 at programist.ru Wed Feb 10 10:12:05 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 12:12:05 +0300 Subject: [Interest] x-platform way to pull app version? In-Reply-To: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> References: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> Message-ID: <1078105723.20160210121205@programist.ru> > On Monday 01 February 2016 20:20:51 André Somers wrote: >> Easiest is to let your buildsystem generate some cpp code with the version >> numbers in each build. We compiled in version number, git id an time & date >> with a simple script called from qmake on every build. > Note that it's a bad idea to embed the time and date. A build from the exact > same sources should produce the exact same binary. But problem exist already many decades even if I want to get same binary I can not! This is because simple compilation produces DIFFERENT binaries (at least on Windows) while executing sequentially two times on same machine ... even for console application with void main() {} source code. Here is the real result: Comparing files D:\test1.exe and D:\test2.exe 000000E0: 02 08 Here test1.exe and test2.exe are result of building "void main() {}" source code two times Funny?! :) From pr12og2 at programist.ru Wed Feb 10 13:07:05 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 15:07:05 +0300 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: <1767852138.20160210150705@programist.ru> An HTML attachment was scrubbed... URL: From pr12og2 at programist.ru Tue Feb 9 16:31:54 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 18:31:54 +0300 Subject: [Interest] QWidget style change and reverting it back Message-ID: <726335071.20160209183154@programist.ru> I am trying to change color of QLineEdit with ui->lineEdit->setStyleSheet("color: red;"); How that could be that doing the same thing second time I got changed size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. And how to make lineEdit look as it was before using it's setStyleSheet() method? ui->lineEdit->setStyleSheet(""); does not work for me. Or using setStyleSheet() is irreversible operation? If so how to change color of widget and then return it back. From pr12og2 at programist.ru Tue Feb 9 19:48:26 2016 From: pr12og2 at programist.ru (Prav) Date: Tue, 9 Feb 2016 21:48:26 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <6993794.ZdIunlXAQM@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> Message-ID: <627820099.20160209214826@programist.ru> Hello, Thiago. Thanks for explanations! But I did get clear overall picture yet. >> I am trying to change color of QLineEdit with >> ui->lineEdit->setStyleSheet("color: red;"); > Why didn't you just set the colour, by changing the widget's palette? I was expecting this is the same ... but this way seemed for me to be more easy to extend ... I mean easy to edit to add more specifications Now I get that calling setStyleSheet("color: red;") is not done via calling setPalette(). >> How that could be that doing the same thing second time I got changed >> size of lineEdit? ... Windows, Qt 5.5.1 ... test project is inside zip-file. I did not get reason for this behavior. Let me explain it again. If I press button second time I see that lineEdit changes its size? BUT ... from external point of view it looks like the same property was set to the same value again! That second call changes something? Style? Then this mean that first call did done the job totally. This all looks kind of magic for me ... or at least strange/unexpected behavior IMHO. >> Or using setStyleSheet() is irreversible operation? > It has an irreversible consequence, that of using QStyleSheetStyle for the > widget's style, instead of whatever is the default for your platform. I got the idea about role of QStyleSheetStyle and it make sense. I did not get why style manipulations are made irreversible? I was thinking that there is some king of property of widget that stores style (or style*). How changing the value of this property could be irreversible? Why this property can not be set to whatever it was (this is meaning of irreversible for me)? > The QStyleSheetStyle class is supposed to mimic the > platform's style, but it exists in the first place in order to do things that > are not possible with the platform's style. OK ... how one can understand which properties of style-sheet language are "possible with the platform's style" (to be able to avoid this bad-mimic behaviour of QStyleSheetStyle class as much as possible)? > So if you use stylesheets, you *accept* that your widget will look different > from the platform. That is not a bug. What's more, changing the style implies > you don't want to look like the native look and feel anyway. OK ... so QStyleSheetStyle is mimicing ... but not good ... only for now or there is no such goal to make QStyleSheetStyle look the same as app's style (QWindowsVistaStyle)? I did not get ... are there some sort of big difficulties for QStyleSheetStyle("") to look the same as QWindowsVistaStyle? I can imagine that QWindowsVistaStyle is not easy to implement but if implemented why it can not be used to work for other classed like QStyleSheetStyle? > We can say there's room for improvement, though. See https://bugreports.qt.io/ > browse/QTBUG-50976 for an example. Yes ... this is funny behavior too :) > My personal recommendation: don't use style sheets, at all. There is several big help-docs I read about this style-language ... but now it seems to be not recommended ... such a pity :( >> If so how to change color of widget and then return it back. Let me ask this question in more generous way: How to revert the look-and-feel of widget back as it was before I start touching any look-and-feel properties of widget? From pr12og2 at programist.ru Wed Feb 10 09:24:19 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 11:24:19 +0300 Subject: [Interest] QWidget style change and reverting it back In-Reply-To: <3437386.gIizzNcFU3@tjmaciei-mobl4> References: <726335071.20160209183154@programist.ru> <6993794.ZdIunlXAQM@tjmaciei-mobl4> <627820099.20160209214826@programist.ru> <3437386.gIizzNcFU3@tjmaciei-mobl4> Message-ID: <509671482.20160210112419@programist.ru> >> > The QStyleSheetStyle class is supposed to mimic the >> > platform's style, but it exists in the first place in order to do things >> > that are not possible with the platform's style. >> >> OK ... how one can understand which properties of style-sheet language are >> "possible with the platform's style" (to be able to avoid this bad-mimic >> behaviour of QStyleSheetStyle class as much as possible)? > Assume that whenever you use stylesheets, your widgets may look completely > different from what it would otherwise look. > As I said, you're using style sheets BECAUSE you want to have an alien (non- > native) look and feel. So accept they will look different. I think here is the main difference in your thinking about usefulness of style sheets: One may want to use style sheets not because "you're using style sheets BECAUSE you want to have an alien" BUT because "it is easy to understand and change". And both ways can be possible IF QStyleSheetStyle would not look like an alien. Who wanted to get all things as needed would specify all properties like needed and those who want to change only couple of properties would do only this. Even in docs (http://doc.qt.io/qt-5/stylesheet.html) this idea of QStyleSheetStyle to be like platform-specific style is specified. "The wrapper style [here meant what is returned by QWidget::style() after applying setStyleSheet() to widget] ensures that any active style sheet is respected and otherwise forwards the drawing operations to the underlying, platform-specific style" So I would say that to be an "alien" is not the value for thous who want to use setSetyleSheets(). From pr12og2 at programist.ru Wed Feb 10 10:12:05 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 12:12:05 +0300 Subject: [Interest] x-platform way to pull app version? In-Reply-To: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> References: <15723982.DMzZD2kZ6e@tjmaciei-mobl4> Message-ID: <1078105723.20160210121205@programist.ru> > On Monday 01 February 2016 20:20:51 André Somers wrote: >> Easiest is to let your buildsystem generate some cpp code with the version >> numbers in each build. We compiled in version number, git id an time & date >> with a simple script called from qmake on every build. > Note that it's a bad idea to embed the time and date. A build from the exact > same sources should produce the exact same binary. But problem exist already many decades even if I want to get same binary I can not! This is because simple compilation produces DIFFERENT binaries (at least on Windows) while executing sequentially two times on same machine ... even for console application with void main() {} source code. Here is the real result: Comparing files D:\test1.exe and D:\test2.exe 000000E0: 02 08 Here test1.exe and test2.exe are result of building "void main() {}" source code two times Funny?! :) From pr12og2 at programist.ru Wed Feb 10 13:07:05 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 15:07:05 +0300 Subject: [Interest] How to display custom data entry form on QLineEdit click ? In-Reply-To: References: <628DA260-03FE-4FA2-8154-D753E6A211E0@subsite.com> Message-ID: <1767852138.20160210150705@programist.ru> An HTML attachment was scrubbed... URL: From pr12og2 at programist.ru Wed Feb 10 11:19:04 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 10 Feb 2016 13:19:04 +0300 Subject: [Interest] IDE used to develop qt library In-Reply-To: <1637499.9JIWdWlD1O@tjmaciei-mobl4> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> Message-ID: <413643843.20160210131904@programist.ru> >> I just wonder what kind of IDE do you use to develop the qt library itself. > Qt Creator. >> I didn't find any qtcreator files in the source. What do tools do you use >> for development and browsing the code? > Qt Creator can read the *.pro files. And? For example ... there is no such project like "qt", "qtcore" or "_build_qtlib" "_build_examples" and "_build_tests" while qt.pro is opened in QtCreator ... BUT there are like hundreds! of subprojects. So how to start? How people will going to start adding value to Qt IF entry-level to start programming for Qt in typical programmers environments is made so high?! And moreover it is not clear what else need to be done before opening qt.pro file in QtCreator. From igor.mironchik at gmail.com Wed Feb 10 16:04:41 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Wed, 10 Feb 2016 18:04:41 +0300 Subject: [Interest] WIndows | QMake | DLL Message-ID: <56BB5189.1050400@gmail.com> Hi guys, I'm trying to build my project on windows using MSVC 2013. Project consist of shared lib project and app project. app project depends on shared lib. Everything is fine, but on final link I always receive error like: "cannot open input file MyDll.lib". MyDll.dll is built, but MyDll.lib doesn't exists. Is it qmake's error? How to solve it? From Yves.Bailly at verosoftware.com Wed Feb 10 16:13:47 2016 From: Yves.Bailly at verosoftware.com (Yves Bailly) Date: Wed, 10 Feb 2016 15:13:47 +0000 Subject: [Interest] WIndows | QMake | DLL In-Reply-To: <56BB5189.1050400@gmail.com> References: <56BB5189.1050400@gmail.com> Message-ID: > -----Original Message----- > I'm trying to build my project on windows using MSVC 2013. > > Project consist of shared lib project and app project. app project > depends on shared lib. > > Everything is fine, but on final link I always receive error like: > "cannot open input file MyDll.lib". > > MyDll.dll is built, but MyDll.lib doesn't exists. > > Is it qmake's error? If you're coming from a GCC world, there's an important difference between GCC and MSVC: GCC exports symbols by default, while MSVC doens't. In MSVC, you need to explicitly exports the symbols you want to link against in other projects. If you don't export anything, then MSVC won't generate the .lib file. See: https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx https://msdn.microsoft.com/en-us/library/a90k134d.aspx ...or Google for "__declspec(dllexport)". Hope this helps, -- Yves Bailly Software developer From kshegunov at gmail.com Wed Feb 10 16:14:18 2016 From: kshegunov at gmail.com (Nye) Date: Wed, 10 Feb 2016 17:14:18 +0200 Subject: [Interest] WIndows | QMake | DLL In-Reply-To: <56BB5189.1050400@gmail.com> References: <56BB5189.1050400@gmail.com> Message-ID: Hello, Are you shadow-building? Usually this creates some confusion about where files are to be put, at least this is my experience with win. Kind regards. On Wed, Feb 10, 2016 at 5:04 PM, Igor Mironchik wrote: > Hi guys, > > I'm trying to build my project on windows using MSVC 2013. > > Project consist of shared lib project and app project. app project depends > on shared lib. > > Everything is fine, but on final link I always receive error like: "cannot > open input file MyDll.lib". > > MyDll.dll is built, but MyDll.lib doesn't exists. > > Is it qmake's error? > > How to solve it? > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Wed Feb 10 17:10:04 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 10 Feb 2016 08:10:04 -0800 Subject: [Interest] IDE used to develop qt library In-Reply-To: <413643843.20160210131904@programist.ru> References: <8C0042D8869AEA4AA334B49AFBBCEF82AA4BFB13@TUT-EX02-PV.KSTG.corp> <1637499.9JIWdWlD1O@tjmaciei-mobl4> <413643843.20160210131904@programist.ru> Message-ID: <1944594.zKWtT3Mpii@tjmaciei-mobl4> On quarta-feira, 10 de fevereiro de 2016 13:19:04 PST Prav wrote: > >> I just wonder what kind of IDE do you use to develop the qt library > >> itself. > > > > Qt Creator. > > > >> I didn't find any qtcreator files in the source. What do tools do you use > >> for development and browsing the code? > > > > Qt Creator can read the *.pro files. > > And? > > For example ... there is no such project like "qt", "qtcore" or > "_build_qtlib" "_build_examples" and "_build_tests" while qt.pro is opened > in QtCreator ... BUT there are like hundreds! of subprojects. So how to > start? Don't open qt.pro or qtbase.pro *because* there are hundreds of subprojects. I wouldn't recommend opening src/src.pro either. Open the .pro for each of the library, plugin, example or test that you want to run. For example, if you want to modify QtCore, you need src/corelib/ corelib.pro and the relevant unit tests in tests/auto/corelib. > How people will going to start adding value to Qt IF entry-level to start > programming for Qt in typical programmers environments is made so high?! > > And moreover it is not clear what else need to be done before opening qt.pro > file in QtCreator. Configure Qt with the -developer-build option and build it once. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From igor.mironchik at gmail.com Wed Feb 10 18:15:25 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Wed, 10 Feb 2016 20:15:25 +0300 Subject: [Interest] WIndows | QMake | DLL In-Reply-To: References: <56BB5189.1050400@gmail.com> Message-ID: <56BB702D.1070104@gmail.com> Thank you. Yves Bailly is right, I forgot about Q_DECL_EXPORT & Q_DECL_IMPORT.... On 10.02.2016 18:13, Yves Bailly wrote: >> -----Original Message----- >> I'm trying to build my project on windows using MSVC 2013. >> >> Project consist of shared lib project and app project. app project >> depends on shared lib. >> >> Everything is fine, but on final link I always receive error like: >> "cannot open input file MyDll.lib". >> >> MyDll.dll is built, but MyDll.lib doesn't exists. >> >> Is it qmake's error? > If you're coming from a GCC world, there's an important difference between GCC and MSVC: GCC exports symbols by default, while MSVC doens't. In MSVC, you need to explicitly exports the symbols you want to link against in other projects. > If you don't export anything, then MSVC won't generate the .lib file. > > See: > https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx > https://msdn.microsoft.com/en-us/library/a90k134d.aspx > > ...or Google for "__declspec(dllexport)". > > Hope this helps, > > -- > Yves Bailly > Software developer > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From mwoehlke.floss at gmail.com Wed Feb 10 20:17:15 2016 From: mwoehlke.floss at gmail.com (Matthew Woehlke) Date: Wed, 10 Feb 2016 14:17:15 -0500 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: On 2016-02-09 04:04, Diego Iastrubni wrote: > On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote: >> qmake's philosophy is "assume everything is there and just use it". >> It's meant mostly for using Qt itself, so you can be sure that all >> of it is present. If you use third-party libraries and they're not >> present, you'll get a compilation error somewhere. > > Yes, right. That is why I am probably barking at the wrong tree. I need > CMake support only. > > Integrating 3rd party software into Java/ObjC/Swift code is trivial, there > are lots of project handling this. Its very sad that in 2016 we still don't > have something like that can help integrating 3rd party libraries into my > C++ code. > > How do you guys integrate 3rd party libraries into your code? Don't do that. By doing so, you are assuming responsibility for all the bugs (especially security issues) of said libraries. Most Linux distributions refuse to package any software that bundles third party components for this reason (and others, but the security issue is a deal-breaker). Another down side is that I may not want to use the version you are trying to bundle. For one, it's superfluous if I already have that library. The reason you can get away with this with e.g. Java is because it is a much more closed ecosystem with a rigidly specified mechanism for providing package information (but still has all of the downsides listed above). Unfortunately we don't have that for C++ (although properly written CMake does a darned good job of coming close). -- Matthew From mwoehlke.floss at gmail.com Wed Feb 10 20:21:37 2016 From: mwoehlke.floss at gmail.com (Matthew Woehlke) Date: Wed, 10 Feb 2016 14:21:37 -0500 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: <2420491455075808@web11h.yandex.ru> References: <641781455042823@web29j.yandex.ru> <1889875.FhzZEztGZK@tjmaciei-mobl4> <2420491455075808@web11h.yandex.ru> Message-ID: On 2016-02-09 22:43, Konstantin Podsvirov wrote: > And the Qt project provides great support CMake, how to use the frame (export modules), and support Qt Creator IDE. Yes, Qt is practically a poster child for what projects *ought* to be doing to make themselves easy to use by other CMake projects... and it's not even itself built with CMake! Seriously, you all (Qt folk) do a really great job there; *thank you* :-). p.s. For "embedding" third party libraries in a CMake-based project, CMake external projects are The Right Thing To Do. (But as elsewhere stated, that's rather OT for here.) -- Matthew From annulen at yandex.ru Wed Feb 10 20:27:23 2016 From: annulen at yandex.ru (Konstantin Tokarev) Date: Wed, 10 Feb 2016 22:27:23 +0300 Subject: [Interest] [ANN] build2 - C++ build toolchain In-Reply-To: References: <4521063.hzVPsqVzBg@tjmaciei-mobl4> Message-ID: <547151455132443@web14m.yandex.ru> 10.02.2016, 22:17, "Matthew Woehlke" : > On 2016-02-09 04:04, Diego Iastrubni wrote: >>  On Mon, Feb 8, 2016 at 11:21 PM, Thiago Macieira wrote: >>>  qmake's philosophy is "assume everything is there and just use it". >>>  It's meant mostly for using Qt itself, so you can be sure that all >>>  of it is present. If you use third-party libraries and they're not >>>  present, you'll get a compilation error somewhere. >> >>  Yes, right. That is why I am probably barking at the wrong tree. I need >>  CMake support only. >> >>  Integrating 3rd party software into Java/ObjC/Swift code is trivial, there >>  are lots of project handling this. Its very sad that in 2016 we still don't >>  have something like that can help integrating 3rd party libraries into my >>  C++ code. >> >>  How do you guys integrate 3rd party libraries into your code? > > Don't do that. By doing so, you are assuming responsibility for all the > bugs (especially security issues) of said libraries. Most Linux > distributions refuse to package any software that bundles third party > components for this reason (and others, but the security issue is a > deal-breaker). That's double-ended sword actually: by using external libraries you take responsibility for all the bugs present in all releases of these libraries except ones you have QA for. Also, in case of Linux distributions they can apply 3rd party patches to these libraries changing behavior and possibly leading to bugs in your application. Also, in many circumstances (embedded systems, stand-alone binary packages) you just cannot rely on external distributor to fix security bugs for you. So, unless your goal is to prepare package for particular distro, there is no certain answer. > > Another down side is that I may not want to use the version you are > trying to bundle. For one, it's superfluous if I already have that library. > > The reason you can get away with this with e.g. Java is because it is a > much more closed ecosystem with a rigidly specified mechanism for > providing package information (but still has all of the downsides listed > above). Unfortunately we don't have that for C++ (although properly > written CMake does a darned good job of coming close). > > -- > Matthew > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- Regards, Konstantin From jhihn at gmx.com Wed Feb 10 21:19:46 2016 From: jhihn at gmx.com (Jason H) Date: Wed, 10 Feb 2016 21:19:46 +0100 Subject: [Interest] background uploads in iOS Message-ID: I was reading on how I can do background uploads and it seems as os iOS 7, there is a facility to do this. ( https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html ) ( https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22 ) I also know what Qt has to use the iOS networking APIs, and was wondering if this is already supported in some degree? I was thinking I could use: UIBackgroundModes: fetch to post the content? I found this page ( http://hayageek.com/ios-background-fetch/ ) that says I need to call a completion handler, but I am unsure as to where I add this in a QML app? Many thanks in advance From rpzrpzrpz at gmail.com Wed Feb 10 21:55:43 2016 From: rpzrpzrpz at gmail.com (mark diener) Date: Wed, 10 Feb 2016 14:55:43 -0600 Subject: [Interest] background uploads in iOS In-Reply-To: References: Message-ID: maybe? https://github.com/colede/qt-app-delegate md On Wed, Feb 10, 2016 at 2:19 PM, Jason H wrote: > I was reading on how I can do background uploads and it seems as os iOS 7, there is a facility to do this. > ( https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html ) > ( https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22 ) > > I also know what Qt has to use the iOS networking APIs, and was wondering if this is already supported in some degree? I was thinking I could use: UIBackgroundModes: fetch to post the content? I found this page > ( http://hayageek.com/ios-background-fetch/ ) that says I need to call a completion handler, but I am unsure as to where I add this in a QML app? > > Many thanks in advance > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From steveire at gmail.com Wed Feb 10 23:55:22 2016 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 10 Feb 2016 23:55:22 +0100 Subject: [Interest] [ANN] build2 - C++ build toolchain References: <641781455042823@web29j.yandex.ru> <1889875.FhzZEztGZK@tjmaciei-mobl4> <2420491455075808@web11h.yandex.ru> Message-ID: Matthew Woehlke wrote: > On 2016-02-09 22:43, Konstantin Podsvirov wrote: >> And the Qt project provides great support CMake, how to use the frame >> (export modules), and support Qt Creator IDE. > > Yes, Qt is practically a poster child for what projects *ought* to be > doing to make themselves easy to use by other CMake projects... and it's > not even itself built with CMake! Seriously, you all (Qt folk) do a > really great job there; *thank you* :-). Well it should be the poster child! I designed and implemented both the CMake features and the Qt side so it's not surprising. Conway's Law ensures the result after that. Steve. From kshegunov at gmail.com Thu Feb 11 01:48:11 2016 From: kshegunov at gmail.com (Nye) Date: Thu, 11 Feb 2016 02:48:11 +0200 Subject: [Interest] Is QEventPrivate a remnant? Message-ID: Hello, In qcoreevent.h one could see that a pointer to the forward declared QEventPrivate is declared as a member of QEvent, however I wasn't able to see that class defined anywhere. Is this a leftover from a previous version or something that was never implemented? As I'm implementing a few of my own events do I need to worry about this, or should I simply add the members directly to QEvent? Exact location in qcoreevent.h: http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qcoreevent.h#n303 Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Thu Feb 11 02:21:28 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 10 Feb 2016 17:21:28 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: Message-ID: <2127733.TuaaLjuTo7@tjmaciei-mobl4> On quinta-feira, 11 de fevereiro de 2016 02:48:11 PST Nye wrote: > Hello, > In qcoreevent.h one could see that a pointer to the forward > declared QEventPrivate is declared as a member of QEvent, however I wasn't > able to see that class defined anywhere. Is this a leftover from a previous > version or something that was never implemented? It was never implemented. We haven't had the need. > As I'm implementing a few > of my own events do I need to worry about this, or should I simply add the > members directly to QEvent? You cannot modify QEvent. Do you mean your own class? Whether it's derived from QEvent or not is irrelevant to whether you can add members. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From kshegunov at gmail.com Thu Feb 11 02:27:19 2016 From: kshegunov at gmail.com (Nye) Date: Thu, 11 Feb 2016 03:27:19 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <2127733.TuaaLjuTo7@tjmaciei-mobl4> References: <2127733.TuaaLjuTo7@tjmaciei-mobl4> Message-ID: Hello and thanks for the prompt reply! > You cannot modify QEvent. > Do you mean your own class? Whether it's derived from QEvent or not is > irrelevant to whether you can add members. I meant that I'm deriving from QEvent. When I derived from QCoreApplication, I also did it for QCoreApplicationPrivate and passed my private object instance trough the QCoreApplication(QCoreApplicationPrivate &) constructor. So I was wondering if I'm missing something with the event, although as it's was never implemented I believe I'm okay. Thanks for the input! On Thu, Feb 11, 2016 at 3:21 AM, Thiago Macieira wrote: > On quinta-feira, 11 de fevereiro de 2016 02:48:11 PST Nye wrote: > > Hello, > > In qcoreevent.h one could see that a pointer to the forward > > declared QEventPrivate is declared as a member of QEvent, however I > wasn't > > able to see that class defined anywhere. Is this a leftover from a > previous > > version or something that was never implemented? > > It was never implemented. We haven't had the need. > > > As I'm implementing a few > > of my own events do I need to worry about this, or should I simply add > the > > members directly to QEvent? > > You cannot modify QEvent. > > Do you mean your own class? Whether it's derived from QEvent or not is > irrelevant to whether you can add members. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Thu Feb 11 04:29:04 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 10 Feb 2016 19:29:04 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <2127733.TuaaLjuTo7@tjmaciei-mobl4> Message-ID: <34671608.MY2VAq9m72@tjmaciei-mobl4> On quinta-feira, 11 de fevereiro de 2016 03:27:19 PST Nye wrote: > Hello and thanks for the prompt reply! > > > You cannot modify QEvent. > > Do you mean your own class? Whether it's derived from QEvent or not is > > irrelevant to whether you can add members. > > I meant that I'm deriving from QEvent. When I derived from > QCoreApplication, I also did it for QCoreApplicationPrivate and passed my > private object instance trough the QCoreApplication(QCoreApplicationPrivate > &) constructor. So I was wondering if I'm missing something with the event, > although as it's was never implemented I believe I'm okay. You should not have done that. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From ekke at ekkes-corner.org Thu Feb 11 10:39:21 2016 From: ekke at ekkes-corner.org (ekke) Date: Thu, 11 Feb 2016 10:39:21 +0100 Subject: [Interest] qt.labs.controls Material Toasts Message-ID: <56BC56C9.6020203@ekkes-corner.org> Hi, are there any plans to provide Snackbars and Toasts out of the box ? http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html or do I have to implement them by trying to customize existing controls ? thx -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekke at ekkes-corner.org Thu Feb 11 10:47:16 2016 From: ekke at ekkes-corner.org (ekke) Date: Thu, 11 Feb 2016 10:47:16 +0100 Subject: [Interest] qt.labs.controls Material Toasts In-Reply-To: <56BC56C9.6020203@ekkes-corner.org> References: <56BC56C9.6020203@ekkes-corner.org> Message-ID: <56BC58A4.80807@ekkes-corner.org> sorry, was an old link - this one is the actual one: https://www.google.com/design/spec/components/snackbars-toasts.html Am 11.02.16 um 10:39 schrieb ekke: > Hi, > > are there any plans to provide Snackbars and Toasts out of the box ? > http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html > > > or do I have to implement them by trying to customize existing controls ? > > thx > -- > > ekke (ekkehard gentz) > > independent software architect > international development native mobile business apps > BlackBerry 10 | Qt Mobile (Android, iOS) > workshops - trainings - bootcamps > > *BlackBerry Elite Developer > BlackBerry Platinum Enterprise Partner* > > max-josefs-platz 30, D-83022 rosenheim, germany > mailto:ekke at ekkes-corner.org > blog: http://ekkes-corner.org > apps and more: http://appbus.org > > twitter: @ekkescorner > skype: ekkes-corner > LinkedIn: http://linkedin.com/in/ekkehard/ > Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kshegunov at gmail.com Thu Feb 11 14:45:08 2016 From: kshegunov at gmail.com (Nye) Date: Thu, 11 Feb 2016 15:45:08 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <34671608.MY2VAq9m72@tjmaciei-mobl4> References: <2127733.TuaaLjuTo7@tjmaciei-mobl4> <34671608.MY2VAq9m72@tjmaciei-mobl4> Message-ID: > You should not have done that. How come? I shouldn't have derived from QCoreApplication or shouldn't have used the private API? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnurmi at theqtcompany.com Thu Feb 11 16:45:02 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Thu, 11 Feb 2016 15:45:02 +0000 Subject: [Interest] qt.labs.controls Material Toasts In-Reply-To: <56BC58A4.80807@ekkes-corner.org> References: <56BC56C9.6020203@ekkes-corner.org> <56BC58A4.80807@ekkes-corner.org> Message-ID: Hi, We would definitely like to extend our offering with some sort of tooltips and notification banners in the future. We might prefer stick to the terminology Qt and Qt Quick have used in the past, so we probably won't end up calling them snackbars, toasts, or anything else as delicious, though. :) I have filed suggestions for both so they don't get forgotten: - https://bugreports.qt.io/browse/QTBUG-51003 - https://bugreports.qt.io/browse/QTBUG-51060 -- J-P Nurmi From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of ekke Sent: Thursday, February 11, 2016 10:47 To: interest at qt-project.org Subject: Re: [Interest] qt.labs.controls Material Toasts sorry, was an old link - this one is the actual one: https://www.google.com/design/spec/components/snackbars-toasts.html Am 11.02.16 um 10:39 schrieb ekke: Hi, are there any plans to provide Snackbars and Toasts out of the box ? http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html or do I have to implement them by trying to customize existing controls ? thx -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Corey.Pendleton at garmin.com Thu Feb 11 18:39:09 2016 From: Corey.Pendleton at garmin.com (Pendleton, Corey) Date: Thu, 11 Feb 2016 17:39:09 +0000 Subject: [Interest] Qt Quick for Android VRAM usage Message-ID: <5FFC5568D17E72418D3447AA09F49E690111D77748@OLAWPA-EXMB02.ad.garmin.com> Hello all, We have a Qt Quick application on Android that we are trying to profile. In particular we are interested in the VRAM usage of the application. Utilizing Android's "dumpsys gfxinfo" command outputs a steady amount of used memory regardless of additional objects rendered on screen. This number also seems low to us. I realized this may be due to the concept that Qt is essentially rendering into a single OpenGL Surface on Android. Does this understanding make sense? If this is true, then is there some way to determine what calls Qt may be making to alloc memory on the GPU? Thanks! Corey Pendleton ________________________________ CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From realnc at gmail.com Thu Feb 11 18:40:00 2016 From: realnc at gmail.com (Nikos Chantziaras) Date: Thu, 11 Feb 2016 19:40:00 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <2127733.TuaaLjuTo7@tjmaciei-mobl4> <34671608.MY2VAq9m72@tjmaciei-mobl4> Message-ID: On 11/02/16 15:45, Nye wrote: > > You should not have done that. > How come? I shouldn't have derived from QCoreApplication or shouldn't > have used the private API? Don't use the private APIs. If you want to create a QCoreApplication subclass, simply derive from that. Same for every other class. From kshegunov at gmail.com Thu Feb 11 19:01:08 2016 From: kshegunov at gmail.com (Nye) Date: Thu, 11 Feb 2016 20:01:08 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <2127733.TuaaLjuTo7@tjmaciei-mobl4> <34671608.MY2VAq9m72@tjmaciei-mobl4> Message-ID: Hello, It seems some elaboration is in order to explain why I've done that the way I did. I'm wrapping around the OpenMPI library for purposes of running the particular library with my applications on a cluster. What I'm trying to achieve is to have the MPI messages come as events through Qt's event delivery system in the "most natural" way possible. I don't intend do disable the sockets, nor the timers, provided by the default implementations of the event dispatchers, so for that purpose, I derive my event dispatcher either from QEventDispatcherWin32 or QEventDispatcherUNIX depending on the Q_OS_* macros. Then in the dispatcher's processEvents() I pull the MPI messages before calling the superclass' implementation of the aforementioned method. The platform specific event dispatchers are already a part of the private API, so when deriving from QCoreApplication I've taken the liberty to do the same for the private object, and to pass it through the appropriate constructor. Additionally, I'm calling the QCoreApplicationPrivate::eventDispatcher->startingUp(); and the corresponding QCoreApplicationPrivate::eventDispatcher->closingDown(); functions as noted in the comments in the QCoreApplication source (and as done in QGuiApplication). I'm aware that I'm breaking binary compatibility, but since Qt and my library will be built on the cluster manually (it's not installed, and won't be at some point in the future) this doesn't seem to be such a problem. However, any suggestions on how I could've done better by my code are greatly appreciated! Kind regards. On Thu, Feb 11, 2016 at 7:40 PM, Nikos Chantziaras wrote: > On 11/02/16 15:45, Nye wrote: > >> > You should not have done that. >> How come? I shouldn't have derived from QCoreApplication or shouldn't >> have used the private API? >> > > Don't use the private APIs. If you want to create a QCoreApplication > subclass, simply derive from that. Same for every other class. > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From israel at ravnalaska.net Thu Feb 11 19:50:58 2016 From: israel at ravnalaska.net (Israel Brewster) Date: Thu, 11 Feb 2016 09:50:58 -0900 Subject: [Interest] QSettings doesn't save settings Message-ID: <565664FE-356A-4699-92AB-92C202F0FAEB@ravnalaska.net> I have an app I built using Qt 5.5.1 on Mac OS X 10.11.1 (and perhaps other versions, but that's where I'm testing), which is sandboxed. When I run the app, it creates the sandbox directory just fine, however QSettings never creates the settings file. I am using QSettings at its most basic form, that is I create the settings object like so: QSettings settings("israelbrewster","epunchclockstd"); and then use it. However, even if I call sync(), no settings file is ever created, and every time I create a settings object, I get an empty one - none of the settings I have saved ever show up. Calling settings.status() shows "NoError", which doesn't help and obviously isn't correct. HOWEVER, if I first manually create the settings file from a terminal window, it works fine - settings are saved and can be changed at will. It's just the initial creation that doesn't appear to be working. How can I fix this? ----------------------------------------------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 ----------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Israel Brewster.vcf Type: text/directory Size: 417 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From israel at ravnalaska.net Thu Feb 11 20:39:20 2016 From: israel at ravnalaska.net (Israel Brewster) Date: Thu, 11 Feb 2016 10:39:20 -0900 Subject: [Interest] QSettings doesn't save settings In-Reply-To: <565664FE-356A-4699-92AB-92C202F0FAEB@ravnalaska.net> References: <565664FE-356A-4699-92AB-92C202F0FAEB@ravnalaska.net> Message-ID: On Feb 11, 2016, at 9:50 AM, Israel Brewster wrote: > > I have an app I built using Qt 5.5.1 on Mac OS X 10.11.1 (and perhaps other versions, but that's where I'm testing), which is sandboxed. When I run the app, it creates the sandbox directory just fine, however QSettings never creates the settings file. I am using QSettings at its most basic form, that is I create the settings object like so: > > QSettings settings("israelbrewster","epunchclockstd"); > > and then use it. However, even if I call sync(), no settings file is ever created, and every time I create a settings object, I get an empty one - none of the settings I have saved ever show up. Calling settings.status() shows "NoError", which doesn't help and obviously isn't correct. > > HOWEVER, if I first manually create the settings file from a terminal window, it works fine - settings are saved and can be changed at will. It's just the initial creation that doesn't appear to be working. How can I fix this? Quick follow-up: This is apparently not an issue with an incorrect path in QSettings or with the app not having write privileges to the specified directory. I added the following code immediately after declaring the QSettings object: QFile prefsFile(settings.fileName()); if(!prefsFile.exists()){ prefsFile.open(QIODevice::WriteOnly); //try to create the settings file prefsFile.close(); } ...and it works. The file is created, and after that I can set and retrieve settings as expected. This is quite the ugly workaround, however - QSettings should be creating the file if needed already. So at least I have a workaround that *appears* to be functional, but it would be nice to know why this is happening and how to *properly* fix it. Thanks. ----------------------------------------------- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 ----------------------------------------------- > > ----------------------------------------------- > Israel Brewster > Systems Analyst II > Ravn Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7293 > ----------------------------------------------- > > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From thiago.macieira at intel.com Thu Feb 11 22:42:33 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Thu, 11 Feb 2016 13:42:33 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: Message-ID: <1999437.8MExB0T7J0@tjmaciei-mobl4> On quinta-feira, 11 de fevereiro de 2016 20:01:08 PST Nye wrote: > Hello, > It seems some elaboration is in order to explain why I've done that the way > I did. The only reason to subclass one of Qt's QXxxxPrivate classes is if you're developing something as part of Qt. If you're feeling adventurous, you may want to access one of those classes, without deriving from them. But you're still accessing private API and you're subject to the "We mean it" comment in the header. Your binary will be tagged on Linux as "Qt5_PRIVATE_API" and Linux distros will give you a dirty look. > I'm wrapping around the OpenMPI library for purposes of running the > particular library with my applications on a cluster. What I'm trying to > achieve is to have the MPI messages come as events through Qt's event > delivery system in the "most natural" way possible. I don't intend do > disable the sockets, nor the timers, provided by the default > implementations of the event dispatchers, so for that purpose, I derive my > event dispatcher either from QEventDispatcherWin32 or QEventDispatcherUNIX > depending on the Q_OS_* macros. How do MPI messages come through normally? On a Unix system, there are only two possible sources of events: file descriptors and timers. On Windows, there's a third (HANDLE events, for which there's QWinEventNotifier). Why couldn't you use one of those and build upon it? > Then in the dispatcher's processEvents() I > pull the MPI messages before calling the superclass' implementation of the > aforementioned method. The platform specific event dispatchers are already > a part of the private API, so when deriving from QCoreApplication I've > taken the liberty to do the same for the private object, and to pass it > through the appropriate constructor. Additionally, I'm calling > the QCoreApplicationPrivate::eventDispatcher->startingUp(); and the > corresponding QCoreApplicationPrivate::eventDispatcher->closingDown(); > functions as noted in the comments in the QCoreApplication source (and as > done in QGuiApplication). Yeah, you *can* do it. You just shouldn't. Maybe what we need to do is discuss how to integrate OpenMPI better into Qt, so you don't have to have those hacks in the first place. > I'm aware that I'm breaking binary compatibility, but since Qt and my > library will be built on the cluster manually (it's not installed, and > won't be at some point in the future) this doesn't seem to be such a > problem. However, any suggestions on how I could've done better by my code > are greatly appreciated! You're not breaking binary compatibility because you didn't modify Qt. But you are subject to compatibility on symbols that don't guarantee it. The "We mean it" comment applies. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Thu Feb 11 22:43:34 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Thu, 11 Feb 2016 13:43:34 -0800 Subject: [Interest] QSettings doesn't save settings In-Reply-To: <565664FE-356A-4699-92AB-92C202F0FAEB@ravnalaska.net> References: <565664FE-356A-4699-92AB-92C202F0FAEB@ravnalaska.net> Message-ID: <1494836.K59R6t6eYB@tjmaciei-mobl4> On quinta-feira, 11 de fevereiro de 2016 09:50:58 PST Israel Brewster wrote: > QSettings settings("israelbrewster","epunchclockstd"); > > and then use it. However, even if I call sync(), no settings file is ever > created, and every time I create a settings object, I get an empty one - > none of the settings I have saved ever show up. Calling settings.status() > shows "NoError", which doesn't help and obviously isn't correct. Did you add any setting to that QSettings? If there are no changes, then QSettings doesn't need to save anything. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From kshegunov at gmail.com Fri Feb 12 04:01:34 2016 From: kshegunov at gmail.com (Nye) Date: Fri, 12 Feb 2016 05:01:34 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <1999437.8MExB0T7J0@tjmaciei-mobl4> References: <1999437.8MExB0T7J0@tjmaciei-mobl4> Message-ID: Hello, The only reason to subclass one of Qt's QXxxxPrivate classes is if you're > developing something as part of Qt. > > If you're feeling adventurous, you may want to access one of those classes, > without deriving from them. But you're still accessing private API and > you're > subject to the "We mean it" comment in the header. Your binary will be > tagged > on Linux as "Qt5_PRIVATE_API" and Linux distros will give you a dirty look. At some point I might try opening a module in the playground (not sure if that was the term), although at this point I'm trying to make something work. :) How do MPI messages come through normally? On a Unix system, there are only > two possible sources of events: file descriptors and timers. On Windows, > there's a third (HANDLE events, for which there's QWinEventNotifier). > > Why couldn't you use one of those and build upon it? > Unfortunately, the messages are polled, and I have seen, browsing through the OpenMPI docs, no way of using a file I could select upon when a message had arrived. To check for pending communication, one issues either MPI_Iprobe (non-blocking) or MPI_Probe (busy-wait) to check/wait for a message coming through the library. Additional restrictions are that I'm supposed to have that running on a single thread (the cluster job manager kills my processes if try starting a thread), so I couldn't make this polling in a worker object for example and just signal the application as messages arrive. In the qt forum (http://forum.qt.io/topic/63816/qt-openmpi-wrap/5) I've put some thoughts, although one wouldn't call the discussion lively. What I'm currently doing is just running an endless (non-blocking) loop, processing MPI and then calling the default dispatcher implementation to process any pending timer events. Basically, my processEvents() override consist of a single row: bool QMpiEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) { return processMpiEvents() || EventDispatcher::processEvents(flags & ~QEventLoop::WaitForMoreEvents); } The non-blocking character of the loop is not worrying me, because as I've mentioned MPI_Probe (the "wait for a message") is implemented as a busy-wait. The reason for that is somewhat unclear, but I always assumed it's because the MPI communication is (supposed to) run on a low-latency high-throughput network (the cluster I've been using is employing infiniband). To pile up, the blocking probing doesn't provide a means for interruption or at least to set a timeout. > Yeah, you *can* do it. You just shouldn't. > > Maybe what we need to do is discuss how to integrate OpenMPI better into > Qt, > so you don't have to have those hacks in the first place. This works great for me, provided you have the time and are willing to discuss. I realize that this is somewhat obscure task, as not many people will be wishing to run a Qt application on a cluster. That notwithstanding, any and all suggestions are welcome! You're not breaking binary compatibility because you didn't modify Qt. But > you > are subject to compatibility on symbols that don't guarantee it. The "We > mean > it" comment applies. I meant I'm breaking compatibility between my library (where I'm implementing all that hack-ish stuff) and Qt, so I must rebuild my library with each new build of Qt; I have been warned by QtCreator. Qt itself is still very much binary compatible, as you pointed out. Kind regards, Konstantin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From willemferguson at zoology.up.ac.za Fri Feb 12 07:29:05 2016 From: willemferguson at zoology.up.ac.za (Willem Ferguson) Date: Fri, 12 Feb 2016 08:29:05 +0200 Subject: [Interest] C++ / QML headaches Message-ID: <56BD7BB1.3040709@zoology.up.ac.za> I include an image explaining much of the context of the problem I encounter. I have a QML combobox that needs to respond to a C++ QStringListModel. I do this as follows: At the start where the QML machine is initialised (at the top of the attached image) 1) Define and instantiate the underlying C++ class (DownloadManager) as a global object (downloadhelper), visible to the C++ code far away. 2) Define a context pointer to downloadhelper. The handle for this pointer is "downloadhelper". Within the downloadmanager class (the C++ code): 1) Define a property set (Q_PROPERTY) that allows QML to see several structures inside the C++ code. 2) Define the model vendorModel to be used by the QML combobox. The vendorModel is accessible both as a QStringListModel (vendorModel) and as a function that returns a pointer to a QStrinListModel (VendorModel()). In the QML: 1) The downloadhelper object is seen with the QML code, visible by the italic font of "downloadhelper" as well some of the visible parts within downloadhelper, offered in the dropdown list (right-hand side of attached image) In fact, the function downloadhelper.fill_computer_list() works as expected and fills venderModel (the QStringListModel) with an appropriate QStringList. The result: If, within the model specification in the QML: 1) If I choose "vendorModel" from the dropdown list and execute, there is a segfault at the model definition in the QML Commenting out the model definition eliminates the segfault. 2) If I choose "VendorModel()", the QML processor does not recognise the identifier 3) If I choose the source QStringList (not the model based in that stringlist) I get an error message: ERROR: Unknown method return type: QStringListModel* 4) If I choose VendorModel (as defined in the Q_PROPERTY), then I get the output in the black box at the bottom of the image. If I take the Q_PROPERTY definition as a yard stick, the READ handle VendorModel should be the appropriate one. But VendorModel is not even listed in the dropdown list in the QML code in the image. Any comments or suggestion will be very valuable. Kind regards, willem -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: C++QML1.jpg Type: image/jpeg Size: 92839 bytes Desc: not available URL: From dmitry.volosnykh at gmail.com Fri Feb 12 07:54:00 2016 From: dmitry.volosnykh at gmail.com (Dmitry Volosnykh) Date: Fri, 12 Feb 2016 06:54:00 +0000 Subject: [Interest] C++ / QML headaches In-Reply-To: <56BD7BB1.3040709@zoology.up.ac.za> References: <56BD7BB1.3040709@zoology.up.ac.za> Message-ID: Willem, try removing Q_INVOKABLE before VendorModel() method. Withouth this moc-related "keyword" VendorModel() method will remain "visible" to moc since it is declared as a READ-accessor inside corresponding Q_PROPERTY macro. On Fri, Feb 12, 2016 at 9:29 AM Willem Ferguson < willemferguson at zoology.up.ac.za> wrote: > I include an image explaining much of the context of the problem I > encounter. > > I have a QML combobox that needs to respond to a C++ QStringListModel. I > do this as follows: > > At the start where the QML machine is initialised (at the top of the > attached image) > 1) Define and instantiate the underlying C++ class (DownloadManager) as a > global object (downloadhelper), > visible to the C++ code far away. > 2) Define a context pointer to downloadhelper. The handle for this pointer > is "downloadhelper". > > Within the downloadmanager class (the C++ code): > 1) Define a property set (Q_PROPERTY) that allows QML to see several > structures inside the C++ code. > 2) Define the model vendorModel to be used by the QML combobox. The > vendorModel is accessible both > as a QStringListModel (vendorModel) and as a function that returns a > pointer to a QStrinListModel > (VendorModel()). > > In the QML: > 1) The downloadhelper object is seen with the QML code, visible by the > italic font of "downloadhelper" as well > some of the visible parts within downloadhelper, offered in the > dropdown list (right-hand side of attached image) > In fact, the function downloadhelper.fill_computer_list() works as > expected and fills venderModel (the QStringListModel) > with an appropriate QStringList. > > The result: If, within the model specification in the QML: > 1) If I choose "vendorModel" from the dropdown list and execute, there is > a segfault at the model definition in the QML > Commenting out the model definition eliminates the segfault. > 2) If I choose "VendorModel()", the QML processor does not recognise the > identifier > 3) If I choose the source QStringList (not the model based in that > stringlist) I get an error message: > ERROR: Unknown method return type: QStringListModel* > 4) If I choose VendorModel (as defined in the Q_PROPERTY), then I get the > output in the black box at the bottom of the image. > If I take the Q_PROPERTY definition as a yard stick, the READ handle > VendorModel should be the appropriate one. > But VendorModel is not even listed in the dropdown list in the QML > code in the image. > > Any comments or suggestion will be very valuable. > Kind regards, > willem > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekke at ekkes-corner.org Fri Feb 12 13:04:53 2016 From: ekke at ekkes-corner.org (ekke) Date: Fri, 12 Feb 2016 13:04:53 +0100 Subject: [Interest] Translation Qt Quick Apps (Qt 5.6 qt.labs.controls) Message-ID: <56BDCA65.9080809@ekkes-corner.org> Hi, while evaluating Qt 5.6 for Android / iOS and preparing blogs with recipes for BlackBery Cascades developers HowTo go with Qt 5.6 I run into a problem. Using Cascades (qt 4.8) translation is easy: * Open Projectfile (bardescriptor.xml) * add languages and you're done. All the work under the hood: creation of .ts files and generating .qm files was done automagically. I only had to use QtLinguist, translate the strings, save, go back to Eclipse Momentics, refresh and run on device. Have expected something similar with Qt Creator and learned that there are many steps of file creation, copy files, running commands from commandline: https://blog.qt.io/blog/2014/03/19/qt-weekly-2-localizing-qt-quick-apps/ fortunately I found this article: https://wiki.qt.io/Automating_generation_of_qm_files then looked at https://qt.gitorious.org/qt-labs/weather-app?p=qt-labs:weather-app.git;a=blob_plain;f=weatherapp.pro;hb=HEAD tried to understand all what happened inside the .pro and thought that I added the important parts to a .pro file from my sample. project. Here's the .pro - the part below qml.qrc was inserted by me TEMPLATE=app QT+=qmlquick CONFIG+=c++11 SOURCES+=main.cpp #AdditionalimportpathusedtoresolveQMLmodulesinQtCreator'scodemodel QML_IMPORT_PATH= #Defaultrulesfordeployment. include(deployment.pri) RESOURCES+=qml.qrc #var,prepend,append defineReplace(prependAll){ for(a,$$1):result+=$$2$${a}$$3 return($$result) } #Supportedlanguages LANGUAGES=deen #Availabletranslations TRANSLATIONS=$$prependAll(LANGUAGES,$$PWD/translations/EkkesSampleApp_,.ts) #Usedtoembedtheqmfilesinresources TRANSLATIONS_FILES= #runLRELEASEtogeneratetheqmfiles qtPrepareTool(LRELEASE,lrelease) for(tsfile,TRANSLATIONS){ qmfile=$$shadowed($$tsfile) qmfile~=s,\\.ts$,.qm, qmdir=$$dirname(qmfile) !exists($$qmdir){ mkpath($$qmdir)|error("Aborting.") } command=$$LRELEASE-removeidentical$$tsfile-qm$$qmfile system($$command)|error("Failedtorun:$$command") TRANSLATIONS_FILES+=$$qmfile } #TRANSLATIONS-Createextratargetsforconvenience wd=$$replace(PWD,/,$$QMAKE_DIR_SEP) #LUPDATE-Makenewtargetsforeachandalllanguages qtPrepareTool(LUPDATE,lupdate) LUPDATE+=-locationsrelative-no-ui-lines TSFILES=$$files($$PWD/translations/QuickForecast_*.ts)$$PWD/translations/EkkesSampleApp_untranslated.ts for(file,TSFILES){ lang=$$replace(file,.*_([^/]*)\\.ts,\\1) v=ts-$${lang}.commands $$v=cd$$wd&&$$LUPDATE$$SOURCES$$APP_FILES-ts$$file QMAKE_EXTRA_TARGETS+=ts-$$lang } But getting an error: 12:14:37: Starting: "/usr/bin/make" /daten/_QT/5.6/android_armv7/bin/qmake -spec android-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../EkkesSampleApp/EkkesSampleApp.pro lrelease error: Cannot open /daten/_qt_work/EkkesSampleApp/translations/EkkesSampleApp_de.ts: No such file or directory Project ERROR: Failed to run: /daten/_QT/5.6/android_armv7/bin/lrelease -removeidentical /daten/_qt_work/EkkesSampleApp/translations/EkkesSampleApp_de.ts -qm /daten/_qt_work/build-EkkesSampleApp-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/translations/EkkesSampleApp_de.qm make: *** [Makefile] Error 3 12:14:37: The process "/usr/bin/make" exited with code 2. Error while building/deploying project EkkesSampleApp (kit: Android für armeabi-v7a (GCC 4.9, Qt 5.6.0)) When executing step "Make" Am I missing anything ? Or do I have to add something to the project ? Tried creating the folder translations inside project from OSX Finder but didn't help. Or must folders added another way from inside Qt Creator. thx helping ekke -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekke at ekkes-corner.org Fri Feb 12 13:08:11 2016 From: ekke at ekkes-corner.org (ekke) Date: Fri, 12 Feb 2016 13:08:11 +0100 Subject: [Interest] Translation Qt Quick Apps (Qt 5.6 qt.labs.controls) In-Reply-To: <56BDCA65.9080809@ekkes-corner.org> References: <56BDCA65.9080809@ekkes-corner.org> Message-ID: <56BDCB2B.4090905@ekkes-corner.org> formatting of inserted text was ugly added as .txt file Am 12.02.16 um 13:04 schrieb ekke: > Hi, > > while evaluating Qt 5.6 for Android / iOS and preparing blogs with > recipes for BlackBery Cascades developers HowTo go with Qt 5.6 I run > into a problem. > > Using Cascades (qt 4.8) translation is easy: > > * Open Projectfile (bardescriptor.xml) > * add languages > > and you're done. All the work under the hood: creation of .ts files > and generating .qm files was done automagically. > I only had to use QtLinguist, translate the strings, save, go back to > Eclipse Momentics, refresh and run on device. > > Have expected something similar with Qt Creator and learned that there > are many steps of file creation, copy files, running commands from > commandline: > https://blog.qt.io/blog/2014/03/19/qt-weekly-2-localizing-qt-quick-apps/ > > fortunately I found this article: > https://wiki.qt.io/Automating_generation_of_qm_files > > then looked at > https://qt.gitorious.org/qt-labs/weather-app?p=qt-labs:weather-app.git;a=blob_plain;f=weatherapp.pro;hb=HEAD > > tried to understand all what happened inside the .pro and thought that > I added the important parts to a .pro file from my sample. project. > Here's the .pro - the part below qml.qrc was inserted by me > > T..... see attached .tx file > > > > Am I missing anything ? > > Or do I have to add something to the project ? > > > > Tried creating the folder translations inside project from OSX > Finder but didn't help. > > Or must folders added another way from inside Qt Creator. > > > > thx helping > > > > ekke > > > > > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- .pro: TEMPLATE = app QT += qml quick CONFIG += c++11 SOURCES += main.cpp # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = # Default rules for deployment. include(deployment.pri) RESOURCES += qml.qrc # var, prepend, append defineReplace(prependAll) { for(a,$$1):result += $$2$${a}$$3 return($$result) } # Supported languages LANGUAGES = de en # Available translations TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/translations/EkkesSampleApp_, .ts) # Used to embed the qm files in resources TRANSLATIONS_FILES = # run LRELEASE to generate the qm files qtPrepareTool(LRELEASE, lrelease) for(tsfile, TRANSLATIONS) { qmfile = $$shadowed($$tsfile) qmfile ~= s,\\.ts$,.qm, qmdir = $$dirname(qmfile) !exists($$qmdir) { mkpath($$qmdir)|error("Aborting.") } command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile system($$command)|error("Failed to run: $$command") TRANSLATIONS_FILES += $$qmfile } # TRANSLATIONS - Create extra targets for convenience wd = $$replace(PWD, /, $$QMAKE_DIR_SEP) # LUPDATE - Make new targets for each and all languages qtPrepareTool(LUPDATE, lupdate) LUPDATE += -locations relative -no-ui-lines TSFILES = $$files($$PWD/translations/QuickForecast_*.ts) $$PWD/translations/EkkesSampleApp_untranslated.ts for(file, TSFILES) { lang = $$replace(file, .*_([^/]*)\\.ts, \\1) v = ts-$${lang}.commands $$v = cd $$wd && $$LUPDATE $$SOURCES $$APP_FILES -ts $$file QMAKE_EXTRA_TARGETS += ts-$$lang } error: 12:14:37: Starting: "/usr/bin/make" /daten/_QT/5.6/android_armv7/bin/qmake -spec android-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../EkkesSampleApp/EkkesSampleApp.pro lrelease error: Cannot open /daten/_qt_work/EkkesSampleApp/translations/EkkesSampleApp_de.ts: No such file or directory Project ERROR: Failed to run: /daten/_QT/5.6/android_armv7/bin/lrelease -removeidentical /daten/_qt_work/EkkesSampleApp/translations/EkkesSampleApp_de.ts -qm /daten/_qt_work/build-EkkesSampleApp-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_6_0-Debug/translations/EkkesSampleApp_de.qm make: *** [Makefile] Error 3 12:14:37: The process "/usr/bin/make" exited with code 2. Error while building/deploying project EkkesSampleApp (kit: Android für armeabi-v7a (GCC 4.9, Qt 5.6.0)) When executing step "Make" From igor.mironchik at gmail.com Fri Feb 12 13:25:18 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Fri, 12 Feb 2016 15:25:18 +0300 Subject: [Interest] Starting drag operation from slot. Message-ID: <56BDCF2E.5030301@gmail.com> Hi folks, I need to start drag operation in slot connected to QAction::triggered(). Below is what I do in the slot. { const QString fileName = QFileDialog::getOpenFileName( this, tr( "Select Image" ), QStandardPaths::standardLocations( QStandardPaths::PicturesLocation ).first(), tr( "Image Files (*.png *.jpg *.jpeg *.bmp)" ) ); if( !fileName.isEmpty() ) { QImage image( fileName ); if( !image.isNull() ) { QDrag * drag = new QDrag( this ); QMimeData * mimeData = new QMimeData; QPixmap p; QSize s = image.size(); if( s.width() > 50 || s.height() > 50 ) { s = s.boundedTo( QSize( 50, 50 ) ); p = QPixmap::fromImage( image.scaled( s, Qt::KeepAspectRatio, Qt::SmoothTransformation ) ); } else p = QPixmap::fromImage( image ); mimeData->setImageData( image ); drag->setMimeData( mimeData ); drag->setPixmap( p ); QApplication::processEvents(); QMouseEvent event( QEvent::MouseButtonPress, QPointF( -10.0, -10.0 ), Qt::LeftButton, 0, 0 ); QApplication::sendEvent( this, &event ); drag->exec(); } else QMessageBox::warning( this, tr( "Wrong Image..." ), tr( "Failed to load image from \"%1\"." ).arg( fileName ) ); } } This works if I choose image and press button OK in file dialog. But if I double-click on the file name in file dialog then drag appears and immediately disappear... How to fix it? Any ideas, please. Thank you. From samuel.gaist at edeltech.ch Fri Feb 12 13:50:52 2016 From: samuel.gaist at edeltech.ch (Samuel Gaist) Date: Fri, 12 Feb 2016 13:50:52 +0100 Subject: [Interest] qt.labs.controls Material Toasts In-Reply-To: References: <56BC56C9.6020203@ekkes-corner.org> <56BC58A4.80807@ekkes-corner.org> Message-ID: <8CE335CB-6F6F-4F88-8710-4C91B372A2EA@edeltech.ch> Hi, Out of curiosity, should that be driven by the OS notification system ? Samuel On 11 févr. 2016, at 16:45, Nurmi J-P wrote: > Hi, > > We would definitely like to extend our offering with some sort of tooltips and notification banners in the future. We might prefer stick to the terminology Qt and Qt Quick have used in the past, so we probably won’t end up calling them snackbars, toasts, or anything else as delicious, though. :) > > I have filed suggestions for both so they don’t get forgotten: > - https://bugreports.qt.io/browse/QTBUG-51003 > - https://bugreports.qt.io/browse/QTBUG-51060 > > -- > J-P Nurmi > > From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of ekke > Sent: Thursday, February 11, 2016 10:47 > To: interest at qt-project.org > Subject: Re: [Interest] qt.labs.controls Material Toasts > > sorry, was an old link - this one is the actual one: > https://www.google.com/design/spec/components/snackbars-toasts.html > > Am 11.02.16 um 10:39 schrieb ekke: > Hi, > > are there any plans to provide Snackbars and Toasts out of the box ? > http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html > > or do I have to implement them by trying to customize existing controls ? > > thx > -- > ekke (ekkehard gentz) > > independent software architect > international development native mobile business apps > BlackBerry 10 | Qt Mobile (Android, iOS) > workshops - trainings - bootcamps > > BlackBerry Elite Developer > BlackBerry Platinum Enterprise Partner > > max-josefs-platz 30, D-83022 rosenheim, germany > mailto:ekke at ekkes-corner.org > blog: http://ekkes-corner.org > apps and more: http://appbus.org > > twitter: @ekkescorner > skype: ekkes-corner > LinkedIn: http://linkedin.com/in/ekkehard/ > Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > > -- > ekke (ekkehard gentz) > > independent software architect > international development native mobile business apps > BlackBerry 10 | Qt Mobile (Android, iOS) > workshops - trainings - bootcamps > > BlackBerry Elite Developer > BlackBerry Platinum Enterprise Partner > > max-josefs-platz 30, D-83022 rosenheim, germany > mailto:ekke at ekkes-corner.org > blog: http://ekkes-corner.org > apps and more: http://appbus.org > > twitter: @ekkescorner > skype: ekkes-corner > LinkedIn: http://linkedin.com/in/ekkehard/ > Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Message signed with OpenPGP using GPGMail URL: From igor.mironchik at gmail.com Fri Feb 12 14:10:14 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Fri, 12 Feb 2016 16:10:14 +0300 Subject: [Interest] Starting drag operation from slot. In-Reply-To: <56BDCF2E.5030301@gmail.com> References: <56BDCF2E.5030301@gmail.com> Message-ID: <56BDD9B6.4020106@gmail.com> Hi, Next code works... :) { const QString fileName = QFileDialog::getOpenFileName( this, tr( "Select Image" ), QStandardPaths::standardLocations( QStandardPaths::PicturesLocation ).first(), tr( "Image Files (*.png *.jpg *.jpeg *.bmp)" ), 0, QFileDialog::DontUseNativeDialog ); QApplication::processEvents(); if( !fileName.isEmpty() ) { QImage image( fileName ); if( !image.isNull() ) { QDrag * drag = new QDrag( this ); QMimeData * mimeData = new QMimeData; QPixmap p; QSize s = image.size(); if( s.width() > 50 || s.height() > 50 ) { s = s.boundedTo( QSize( 50, 50 ) ); p = QPixmap::fromImage( image.scaled( s, Qt::KeepAspectRatio, Qt::SmoothTransformation ) ); } else p = QPixmap::fromImage( image ); mimeData->setImageData( image ); drag->setMimeData( mimeData ); drag->setPixmap( p ); QApplication::processEvents(); drag->exec(); } else QMessageBox::warning( this, tr( "Wrong Image..." ), tr( "Failed to load image from \"%1\"." ).arg( fileName ) ); } } On 12.02.2016 15:25, Igor Mironchik wrote: > Hi folks, > > I need to start drag operation in slot connected to QAction::triggered(). > > Below is what I do in the slot. > > { > const QString fileName = > QFileDialog::getOpenFileName( this, tr( "Select Image" ), > QStandardPaths::standardLocations( > QStandardPaths::PicturesLocation ).first(), > tr( "Image Files (*.png *.jpg *.jpeg *.bmp)" ) ); > > if( !fileName.isEmpty() ) > { > QImage image( fileName ); > > if( !image.isNull() ) > { > QDrag * drag = new QDrag( this ); > QMimeData * mimeData = new QMimeData; > > QPixmap p; > QSize s = image.size(); > > if( s.width() > 50 || s.height() > 50 ) > { > s = s.boundedTo( QSize( 50, 50 ) ); > p = QPixmap::fromImage( > image.scaled( s, Qt::KeepAspectRatio, > Qt::SmoothTransformation ) ); > } > else > p = QPixmap::fromImage( image ); > > mimeData->setImageData( image ); > drag->setMimeData( mimeData ); > drag->setPixmap( p ); > > QApplication::processEvents(); > > QMouseEvent event( QEvent::MouseButtonPress, > QPointF( -10.0, -10.0 ), Qt::LeftButton, 0, 0 ); > > QApplication::sendEvent( this, &event ); > > drag->exec(); > } > else > QMessageBox::warning( this, tr( "Wrong Image..." ), > tr( "Failed to load image from \"%1\"." ).arg( > fileName ) ); > } > } > > This works if I choose image and press button OK in file dialog. > > But if I double-click on the file name in file dialog then drag > appears and immediately disappear... > > How to fix it? > > Any ideas, please. > > Thank you. From elvstone at gmail.com Fri Feb 12 14:59:39 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Fri, 12 Feb 2016 14:59:39 +0100 Subject: [Interest] Item editor at preferred size when using custom delegate? Message-ID: Hi all, I have a very basic item delegate which opens up a custom editor: class MineralLevelsDelegate(QStyledItemDelegate): def createEditor(self, parent, option, index): return MineralLevelsEditor(parent) def updateEditorGeometry(self, editor, option, index): editor.setGeometry( option.rect.x(), option.rect.y() + option.rect.height(), editor.sizeHint().width(), editor.sizeHint().height()) What you see in updateEditorGeometry(...) above is my attempt at making the editor show up at its preferred size (instead of being constrained to the cell in the QTreeView I'm using). My attempt is to use the editor's sizeHint() in the call to setGeometry(...). The problem seems to be that the sizeHint() or the editor is 0x0 at that point (has not been laid out?), and consequently the editor show up as a tiny little rect (see attached sizehint.png). I'm also attaching hardcoded.png, which shows the editor when I instead hardcode it to 200x100. This is kind of the look I want, but obviously I don't want to hardcode it to 200x100, but have it use its preferred size. So question is: How can I make the editor widget show up at its preferred size? Many thanks in advance. Elvis -------------- next part -------------- A non-text attachment was scrubbed... Name: sizehint.png Type: image/png Size: 16666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hardcoded.png Type: image/png Size: 17568 bytes Desc: not available URL: From elvstone at gmail.com Fri Feb 12 15:03:35 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Fri, 12 Feb 2016 15:03:35 +0100 Subject: [Interest] Item editor at preferred size when using custom delegate? In-Reply-To: References: Message-ID: 2016-02-12 14:59 GMT+01:00 Elvis Stansvik : > Hi all, > > I have a very basic item delegate which opens up a custom editor: > > class MineralLevelsDelegate(QStyledItemDelegate): > > def createEditor(self, parent, option, index): > return MineralLevelsEditor(parent) > > def updateEditorGeometry(self, editor, option, index): > editor.setGeometry( > option.rect.x(), option.rect.y() + option.rect.height(), > editor.sizeHint().width(), editor.sizeHint().height()) > For posterity, this is the custom editor widget: class MineralLevelsEditor(QFrame): def __init__(self, parent=None): super(MineralLevelsEditor, self).__init__(parent) self._levels = None self.setAutoFillBackground(True) self.setFrameStyle(QFrame.StyledPanel | QFrame.Raised) self.setLayout(QFormLayout()) @pyqtProperty(QVariant, user=True) def levels(self): return self._levels @levels.setter def levels(self, levels): self._levels = levels for mineral, level in levels.items(): slider = QSlider(Qt.Horizontal) slider.setMinimum(0) slider.setMaximum(100) slider.setValue(level) slider.valueChanged.connect(partial(self._setLevel, mineral)) self.layout().addRow(mineral + ':', slider) def _setLevel(self, mineral, level): self._levels[mineral] = level Elvis > What you see in updateEditorGeometry(...) above is my attempt at > making the editor show up at its preferred size (instead of being > constrained to the cell in the QTreeView I'm using). My attempt is to > use the editor's sizeHint() in the call to setGeometry(...). > > The problem seems to be that the sizeHint() or the editor is 0x0 at > that point (has not been laid out?), and consequently the editor show > up as a tiny little rect (see attached sizehint.png). I'm also > attaching hardcoded.png, which shows the editor when I instead > hardcode it to 200x100. This is kind of the look I want, but obviously > I don't want to hardcode it to 200x100, but have it use its preferred > size. > > So question is: How can I make the editor widget show up at its preferred size? > > Many thanks in advance. > > Elvis From elvstone at gmail.com Fri Feb 12 15:12:17 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Fri, 12 Feb 2016 15:12:17 +0100 Subject: [Interest] Item editor at preferred size when using custom delegate? In-Reply-To: References: Message-ID: 2016-02-12 14:59 GMT+01:00 Elvis Stansvik : > Hi all, > > I have a very basic item delegate which opens up a custom editor: > > class MineralLevelsDelegate(QStyledItemDelegate): > > def createEditor(self, parent, option, index): > return MineralLevelsEditor(parent) > > def updateEditorGeometry(self, editor, option, index): > editor.setGeometry( > option.rect.x(), option.rect.y() + option.rect.height(), > editor.sizeHint().width(), editor.sizeHint().height()) > > What you see in updateEditorGeometry(...) above is my attempt at > making the editor show up at its preferred size (instead of being > constrained to the cell in the QTreeView I'm using). My attempt is to > use the editor's sizeHint() in the call to setGeometry(...). > > The problem seems to be that the sizeHint() or the editor is 0x0 at > that point (has not been laid out?), and consequently the editor show > up as a tiny little rect (see attached sizehint.png). I'm also > attaching hardcoded.png, which shows the editor when I instead > hardcode it to 200x100. This is kind of the look I want, but obviously > I don't want to hardcode it to 200x100, but have it use its preferred > size. > > So question is: How can I make the editor widget show up at its preferred size? And also, to clarify: I don't want the row of the table to change size when going into editing of an item. I just want the editor to be at its preferred size, on top of the table rows. Elvis > > Many thanks in advance. > > Elvis From elvstone at gmail.com Fri Feb 12 15:54:50 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Fri, 12 Feb 2016 15:54:50 +0100 Subject: [Interest] Item editor at preferred size when using custom delegate? In-Reply-To: References: Message-ID: 2016-02-12 14:59 GMT+01:00 Elvis Stansvik : > Hi all, > > I have a very basic item delegate which opens up a custom editor: > > class MineralLevelsDelegate(QStyledItemDelegate): > > def createEditor(self, parent, option, index): > return MineralLevelsEditor(parent) > > def updateEditorGeometry(self, editor, option, index): > editor.setGeometry( > option.rect.x(), option.rect.y() + option.rect.height(), > editor.sizeHint().width(), editor.sizeHint().height()) > > What you see in updateEditorGeometry(...) above is my attempt at > making the editor show up at its preferred size (instead of being > constrained to the cell in the QTreeView I'm using). My attempt is to > use the editor's sizeHint() in the call to setGeometry(...). > > The problem seems to be that the sizeHint() or the editor is 0x0 at > that point (has not been laid out?), and consequently the editor show > up as a tiny little rect (see attached sizehint.png). I'm also > attaching hardcoded.png, which shows the editor when I instead > hardcode it to 200x100. This is kind of the look I want, but obviously > I don't want to hardcode it to 200x100, but have it use its preferred > size. Half replying to myself here: The size hint is actually returning 16x16. I think the problem is maybe that setEditorData has not been called before updateEditorGeometry is called, which in my case means that my sliders has not been created and added to the editor's layout yet. So my question is now: How can I adjust the editor's size after setEditorData has been called? Elvis > > So question is: How can I make the editor widget show up at its preferred size? > > Many thanks in advance. > > Elvis From elvstone at gmail.com Fri Feb 12 16:00:13 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Fri, 12 Feb 2016 16:00:13 +0100 Subject: [Interest] Item editor at preferred size when using custom delegate? In-Reply-To: References: Message-ID: 2016-02-12 15:54 GMT+01:00 Elvis Stansvik : > 2016-02-12 14:59 GMT+01:00 Elvis Stansvik : >> Hi all, >> >> I have a very basic item delegate which opens up a custom editor: >> >> class MineralLevelsDelegate(QStyledItemDelegate): >> >> def createEditor(self, parent, option, index): >> return MineralLevelsEditor(parent) >> >> def updateEditorGeometry(self, editor, option, index): >> editor.setGeometry( >> option.rect.x(), option.rect.y() + option.rect.height(), >> editor.sizeHint().width(), editor.sizeHint().height()) >> >> What you see in updateEditorGeometry(...) above is my attempt at >> making the editor show up at its preferred size (instead of being >> constrained to the cell in the QTreeView I'm using). My attempt is to >> use the editor's sizeHint() in the call to setGeometry(...). >> >> The problem seems to be that the sizeHint() or the editor is 0x0 at >> that point (has not been laid out?), and consequently the editor show >> up as a tiny little rect (see attached sizehint.png). I'm also >> attaching hardcoded.png, which shows the editor when I instead >> hardcode it to 200x100. This is kind of the look I want, but obviously >> I don't want to hardcode it to 200x100, but have it use its preferred >> size. > > Half replying to myself here: The size hint is actually returning > 16x16. I think the problem is maybe that setEditorData has not been > called before updateEditorGeometry is called, which in my case means > that my sliders has not been created and added to the editor's layout > yet. > > So my question is now: How can I adjust the editor's size after > setEditorData has been called? Nevermind, it was as simple as: class MineralLevelsDelegate(QStyledItemDelegate): def createEditor(self, parent, option, index): return MineralLevelsEditor(parent) def updateEditorGeometry(self, editor, option, index): editor.move(option.rect.x(), option.rect.y() + option.rect.height()) That is, instead of using setGeometry, I let the editor stay at its current size (which is its preferred size), and only use move(..) to position it below the cell. Sorry for the noise, hope it can help someone else. Elvis > > Elvis > >> >> So question is: How can I make the editor widget show up at its preferred size? >> >> Many thanks in advance. >> >> Elvis From jpnurmi at theqtcompany.com Fri Feb 12 16:17:05 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Fri, 12 Feb 2016 15:17:05 +0000 Subject: [Interest] qt.labs.controls Material Toasts In-Reply-To: <8CE335CB-6F6F-4F88-8710-4C91B372A2EA@edeltech.ch> References: <56BC56C9.6020203@ekkes-corner.org> <56BC58A4.80807@ekkes-corner.org> <8CE335CB-6F6F-4F88-8710-4C91B372A2EA@edeltech.ch> Message-ID: <71E9C946-F63C-40CB-B1E9-771B2EE6427E@digia.com> Hi Samuel, We’ll probably leave the native notification system integration job to the platform extras or other modules. The new controls are built upon so called Qt Quick templates, and the whole styling system is heavily based on Qt Quick. They are all fully cross-platform styles implementing specific design languages. They are not pretending to be native styles, because there’s actually nothing native there. Bridging native controls doesn’t fit very well into the picture of this project. If we wanted to go native, direct QML bindings to native controls would be my preferred solution. It would be a parallel offering, not mixed with Qt Quick. :) -- J-P Nurmi > On 12 Feb 2016, at 13:50, Samuel Gaist wrote: > > Hi, > > Out of curiosity, should that be driven by the OS notification system ? > > Samuel > > On 11 févr. 2016, at 16:45, Nurmi J-P wrote: > >> Hi, >> >> We would definitely like to extend our offering with some sort of tooltips and notification banners in the future. We might prefer stick to the terminology Qt and Qt Quick have used in the past, so we probably won’t end up calling them snackbars, toasts, or anything else as delicious, though. :) >> >> I have filed suggestions for both so they don’t get forgotten: >> - https://bugreports.qt.io/browse/QTBUG-51003 >> - https://bugreports.qt.io/browse/QTBUG-51060 >> >> -- >> J-P Nurmi >> >> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of ekke >> Sent: Thursday, February 11, 2016 10:47 >> To: interest at qt-project.org >> Subject: Re: [Interest] qt.labs.controls Material Toasts >> >> sorry, was an old link - this one is the actual one: >> https://www.google.com/design/spec/components/snackbars-toasts.html >> >> Am 11.02.16 um 10:39 schrieb ekke: >> Hi, >> >> are there any plans to provide Snackbars and Toasts out of the box ? >> http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html >> >> or do I have to implement them by trying to customize existing controls ? >> >> thx >> -- >> ekke (ekkehard gentz) >> >> independent software architect >> international development native mobile business apps >> BlackBerry 10 | Qt Mobile (Android, iOS) >> workshops - trainings - bootcamps >> >> BlackBerry Elite Developer >> BlackBerry Platinum Enterprise Partner >> >> max-josefs-platz 30, D-83022 rosenheim, germany >> mailto:ekke at ekkes-corner.org >> blog: http://ekkes-corner.org >> apps and more: http://appbus.org >> >> twitter: @ekkescorner >> skype: ekkes-corner >> LinkedIn: http://linkedin.com/in/ekkehard/ >> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 >> >> >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest >> >> >> -- >> ekke (ekkehard gentz) >> >> independent software architect >> international development native mobile business apps >> BlackBerry 10 | Qt Mobile (Android, iOS) >> workshops - trainings - bootcamps >> >> BlackBerry Elite Developer >> BlackBerry Platinum Enterprise Partner >> >> max-josefs-platz 30, D-83022 rosenheim, germany >> mailto:ekke at ekkes-corner.org >> blog: http://ekkes-corner.org >> apps and more: http://appbus.org >> >> twitter: @ekkescorner >> skype: ekkes-corner >> LinkedIn: http://linkedin.com/in/ekkehard/ >> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > From 83.manish at gmail.com Fri Feb 12 17:45:04 2016 From: 83.manish at gmail.com (manish sharma) Date: Fri, 12 Feb 2016 22:15:04 +0530 Subject: [Interest] QAccessibleQuickItem setText Message-ID: I was exploring accessibility options to run some automation and looks like setting text to an item is not implemented in QAccessibleQuickItem which is preventing me from setting text to text items. https://code.woboq.org/qt5/qtdeclarative/src/quick/accessible/qaccessiblequickitem_p.h.html#83 And also it looks like windows plugins does not implement put_accName https://code.woboq.org/qt5/qtbase/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp.html#905 Any plans of getting this fixed? Or Is there any other way to set text to an quick Item? Thanks, Manish -------------- next part -------------- An HTML attachment was scrubbed... URL: From krnekit at gmail.com Fri Feb 12 18:42:11 2016 From: krnekit at gmail.com (Nikita Krupenko) Date: Fri, 12 Feb 2016 19:42:11 +0200 Subject: [Interest] C++ / QML headaches In-Reply-To: <56BD7BB1.3040709@zoology.up.ac.za> References: <56BD7BB1.3040709@zoology.up.ac.za> Message-ID: Possibly you have name clashes here. I suggest not to start property and method names from capital letter, this is only for type names (classes). The property (your 1-st case) is the preferred way, as you use it in binding. Also, rename vendorModel property member to m_vendorModel and make it private. One more thing: have you set parent to the object you return in VendorModel() method? 2016-02-12 8:29 GMT+02:00 Willem Ferguson : > I include an image explaining much of the context of the problem I > encounter. > > I have a QML combobox that needs to respond to a C++ QStringListModel. I do > this as follows: > > At the start where the QML machine is initialised (at the top of the > attached image) > 1) Define and instantiate the underlying C++ class (DownloadManager) as a > global object (downloadhelper), > visible to the C++ code far away. > 2) Define a context pointer to downloadhelper. The handle for this pointer > is "downloadhelper". > > Within the downloadmanager class (the C++ code): > 1) Define a property set (Q_PROPERTY) that allows QML to see several > structures inside the C++ code. > 2) Define the model vendorModel to be used by the QML combobox. The > vendorModel is accessible both > as a QStringListModel (vendorModel) and as a function that returns a > pointer to a QStrinListModel > (VendorModel()). > > In the QML: > 1) The downloadhelper object is seen with the QML code, visible by the > italic font of "downloadhelper" as well > some of the visible parts within downloadhelper, offered in the dropdown > list (right-hand side of attached image) > In fact, the function downloadhelper.fill_computer_list() works as > expected and fills venderModel (the QStringListModel) > with an appropriate QStringList. > > The result: If, within the model specification in the QML: > 1) If I choose "vendorModel" from the dropdown list and execute, there is a > segfault at the model definition in the QML > Commenting out the model definition eliminates the segfault. > 2) If I choose "VendorModel()", the QML processor does not recognise the > identifier > 3) If I choose the source QStringList (not the model based in that > stringlist) I get an error message: > ERROR: Unknown method return type: QStringListModel* > 4) If I choose VendorModel (as defined in the Q_PROPERTY), then I get the > output in the black box at the bottom of the image. > If I take the Q_PROPERTY definition as a yard stick, the READ handle > VendorModel should be the appropriate one. > But VendorModel is not even listed in the dropdown list in the QML code > in the image. > > Any comments or suggestion will be very valuable. > Kind regards, > willem > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > From thiago.macieira at intel.com Fri Feb 12 07:34:28 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Thu, 11 Feb 2016 22:34:28 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <1999437.8MExB0T7J0@tjmaciei-mobl4> Message-ID: <14131511.FTLyX51t8z@tjmaciei-mobl4> Em sexta-feira, 12 de fevereiro de 2016, às 05:01:34 PST, Nye escreveu: > Unfortunately, the messages are polled, and I have seen, browsing through > the OpenMPI docs, no way of using a file I could select upon when a message > had arrived. > To check for pending communication, one issues either MPI_Iprobe > (non-blocking) or MPI_Probe (busy-wait) to check/wait for a message coming > through the library. Additional restrictions are that I'm supposed to have > that running on a single thread (the cluster job manager kills my processes > if try starting a thread), so I couldn't make this polling in a worker > object for example and just signal the application as messages arrive. Use the aboutToBlock() signal to call MPI_Iprobe -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From wintermute_77 at yahoo.com Fri Feb 12 23:53:42 2016 From: wintermute_77 at yahoo.com (steven hay) Date: Fri, 12 Feb 2016 22:53:42 +0000 (UTC) Subject: [Interest] QT5, Mac Accessibility, and Spectacle References: <503141515.2816647.1455317622436.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <503141515.2816647.1455317622436.JavaMail.yahoo@mail.yahoo.com> Hello, I am a user of Qt on my Mac, and one thing I use very frequently are window-resizing keyboard shortcuts using a program called "Spectacle." This program appears to use the Mac Accessibility Protocol to move and resize windows around when certain key combinations are pressed.  With the move to Qt5 from Qt4, this application has stopped working for my Qt apps (I have rebuilt using Qt4 and the functionality comes back) [Note: Specifically, the app I use most is Quassel]. There is an open issue on the Spectacle web site (https://github.com/eczarny/spectacle/issues/529) that has some (very little) information on the issue--but it does indicate the problem may be in the implementation of the accessibility protocol. Is there any way to figure out what the actual problem is here, so that it can be fixed? I realize this is an issue spanning across a few projects--so finding the culprit may be a bit of a challenge.  -------------- next part -------------- An HTML attachment was scrubbed... URL: From nunosantos at imaginando.pt Sat Feb 13 00:06:09 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Fri, 12 Feb 2016 23:06:09 +0000 Subject: [Interest] QtWebEngine module not available when trying to build qt from source Message-ID: <09737EF5-6338-4F34-935B-290F16A215EA@imaginando.pt> Hi, I was trying to enable QtWebEngine module when configuring Qt to build from source. Apparently it is not available. Does anyone know why? Is this an issue or something that doesn’t come on the source code? I’m using the 5.6 beta source .7z Thanks, Nuno From boud at valdyas.org Sat Feb 13 08:53:18 2016 From: boud at valdyas.org (Boudewijn Rempt) Date: Sat, 13 Feb 2016 08:53:18 +0100 (CET) Subject: [Interest] QT5, Mac Accessibility, and Spectacle In-Reply-To: <503141515.2816647.1455317622436.JavaMail.yahoo@mail.yahoo.com> References: <503141515.2816647.1455317622436.JavaMail.yahoo.ref@mail.yahoo.com> <503141515.2816647.1455317622436.JavaMail.yahoo@mail.yahoo.com> Message-ID: Weird, I'm currently working on Krita on OSX and Spectacle's window tiling commands work perfectly. Are you sure you built your Qt5 with accessibility enabled? On Fri, 12 Feb 2016, steven hay via Interest wrote: > Hello, > > I am a user of Qt on my Mac, and one thing I use very frequently are window-resizing keyboard shortcuts using a program > called "Spectacle." This program appears to use the Mac Accessibility Protocol to move and resize windows around when > certain key combinations are pressed.  > > With the move to Qt5 from Qt4, this application has stopped working for my Qt apps (I have rebuilt using Qt4 and the > functionality comes back) [Note: Specifically, the app I use most is Quassel]. There is an open issue on the Spectacle web > site (https://github.com/eczarny/spectacle/issues/529) that has some (very little) information on the issue--but it does > indicate the problem may be in the implementation of the accessibility protocol. > > Is there any way to figure out what the actual problem is here, so that it can be fixed? I realize this is an issue > spanning across a few projects--so finding the culprit may be a bit of a challenge.  > > -- Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org From kshegunov at gmail.com Sat Feb 13 10:17:22 2016 From: kshegunov at gmail.com (Nye) Date: Sat, 13 Feb 2016 11:17:22 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <14131511.FTLyX51t8z@tjmaciei-mobl4> References: <1999437.8MExB0T7J0@tjmaciei-mobl4> <14131511.FTLyX51t8z@tjmaciei-mobl4> Message-ID: Hello, On Fri, Feb 12, 2016 at 8:34 AM, Thiago Macieira wrote: > Em sexta-feira, 12 de fevereiro de 2016, às 05:01:34 PST, Nye escreveu: > > Unfortunately, the messages are polled, and I have seen, browsing through > > the OpenMPI docs, no way of using a file I could select upon when a > message > > had arrived. > > To check for pending communication, one issues either MPI_Iprobe > > (non-blocking) or MPI_Probe (busy-wait) to check/wait for a message > coming > > through the library. Additional restrictions are that I'm supposed to > have > > that running on a single thread (the cluster job manager kills my > processes > > if try starting a thread), so I couldn't make this polling in a worker > > object for example and just signal the application as messages arrive. > > Use the aboutToBlock() signal to call MPI_Iprobe > > Somehow I missed that. :( Thanks! However I'm still going to need to run the dispatcher (default or not) in non-blocking mode, right? Or am I missing something? Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at towel42.com Sat Feb 13 16:42:44 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Sat, 13 Feb 2016 15:42:44 +0000 Subject: [Interest] What version of VS 2013 (ie which update) is Qt 5.5.1 built with Message-ID: While there is a ton of info at http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2013-5.5.1.exe.mirrorlist http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2013_64-5.5.1.exe.mirrorlist I can not find what version of the update (is it 5) is it being built with. I have been burned before by being out of step by one update, so I don't change until all my prebuilt libraries do.... Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From chgans at gna.org Sun Feb 14 00:33:05 2016 From: chgans at gna.org (Ch'Gans) Date: Sun, 14 Feb 2016 12:33:05 +1300 Subject: [Interest] [Development] [Proposal] Future QtSerialPort with plugins architecture In-Reply-To: <56BF1276.5070100@gmail.com> References: <56BF1276.5070100@gmail.com> Message-ID: Hi Denis, Indeed it would be nice to have an extended API for controlling vendor specific extension in a uniform way. Switching between RS232/422/485 is a pretty common feature (including switching b/w full/half duplex, (des)activating termination resistor), as is controlling a few extra GPIO. These features are not FTDI specific. In the past where I made the HW myself, I had the possibility to query for HW errors too, some TTL/RS level converters offer this feature. There's as well the possibility to control somehow slew rate limitation (typ. fast/slow). Maybe the Serial Port API could be enhanced with "capability" queries and associated control functions. Or maybe all of these should be implemented on top of QSP. Concerning the plugin idea, did you check how QSerialBus is achieving the discovery and the handling of vendor specifics? Chris On 14 February 2016 at 00:24, Denis Shienkov wrote: > Hi, folks, > > I would like to discuss new idea of transition of QtSerialPort to > an architecture with the plug-ins/backends. > > The reason is that we can use different approaches on different > platforms to enumerating a list of available devices, and to > implementing a code of I/O engine. > > It will simplify a code and its maintenance for developers, > and also will provide flexibility for users. > > = QSerialPortInfo = > > For example QSerialPortInfo::availablePorts() can be made with, > different ways, which I suggest to divide into plug-ins/backends: > > * on Windows : [setupapi], wmi, generic > * on WinCE : [devmgr] > * on Linux : [udev], sysfs, generic > * on OSX : [iokit], generic > * on FreeBSD : [sysctl], generic > * on QNX : [generic?] > * other Unix : [generic] > > where [...] means that this plugin is preferred/default for this platform. > > The user can use/change desired plugin, e.g. via the > QT_SERIALPORTINFO_PLUGIN environment, or via command line e.g.: > > {code} > set QT_SERIALPORTINFO_PLUGIN=wmi // on windows > myapp.exe > {code} > > {code} > export QT_SERIALPORTINFO_PLUGIN=sysfs // on linux > myapp > {code} > > {code} > myapp -qspi sysfs // on linux > {code} > > and so on, similar to the Qt's platform backends, like this: > > * http://doc.qt.io/qt-5/embedded-linux.html > > Currently we have mess-up (mixing-up) multiple approaches in one > implementation file, via ifdefs and so on, that is looks funny/hard, e.g,: > > * on Windows : setupapi + generic > * on Unix : udev + sysfs + generic > > = QSerialPort = > > Here also can be divided to the plugins/backends. E.g. some vendors > provides own HW chips which is RS232/485/TTL on the physical layer, > but has own vendor-specific API. An example it is FTDI chip with the > D2XX API, that is non-standard "serial port" API. > > In this case the user can choose desired plugins via other > QT_SERIALPOR_PLUGIN environment, or via other command line, e.g.: > > {code} > set QT_SERIALPORTINFO_PLUGIN=ftdi > set QT_SERIALPOR_PLUGIN=ftdi > myapp.exe > {code} > > {code} > myapp.exe -qspi ftdi -qsp ftdi > {code} > > Currently, I don't like the current implementation of internal architecture > of QtSserialPort where the code contains mix from different approaches > and so on, that is hard and ugly, IMHO. > > So, dear community/developers/gurus, what do you think about? :) > > BR, > Denis > > > > > > > > > > > _______________________________________________ > Development mailing list > Development at qt-project.org > http://lists.qt-project.org/mailman/listinfo/development From thiago.macieira at intel.com Sun Feb 14 00:53:00 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sat, 13 Feb 2016 15:53:00 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <14131511.FTLyX51t8z@tjmaciei-mobl4> Message-ID: <1603200.SYW0gd2Jir@tjmaciei-mobl4> On sábado, 13 de fevereiro de 2016 11:17:22 PST Nye wrote: > Thanks! However I'm still going to need to run the dispatcher (default or > not) in non-blocking mode, right? Or am I missing something? Always non-blocking. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From kshegunov at gmail.com Sun Feb 14 01:14:43 2016 From: kshegunov at gmail.com (Nye) Date: Sun, 14 Feb 2016 02:14:43 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <1603200.SYW0gd2Jir@tjmaciei-mobl4> References: <14131511.FTLyX51t8z@tjmaciei-mobl4> <1603200.SYW0gd2Jir@tjmaciei-mobl4> Message-ID: Hello, Sorry for continuing to bug you with this, but I don't seem to grasp how to run QCoreApplication in non-blocking mode. Looking here: http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qcoreapplication.h#n113 and here: http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qeventdispatcher_unix.cpp#n581 It looks like the aforementioned signal will be emitted only if the event loop is about to block, and judging by the statics defined in QCoreApplication I can't set the event processing flags globally. The only way I could fathom to do this would be to run a second event loop by means of QEventLoop and there just run it non-blocking. Something like this: QEventLoop myLoop; myLoop.exec(QEventLoop::AllEvents & ~QEventLoop::WaitForMoreEvents); Am I correct, or there's a better way? Kind regards. On Sun, Feb 14, 2016 at 1:53 AM, Thiago Macieira wrote: > On sábado, 13 de fevereiro de 2016 11:17:22 PST Nye wrote: > > Thanks! However I'm still going to need to run the dispatcher (default or > > not) in non-blocking mode, right? Or am I missing something? > > Always non-blocking. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Sun Feb 14 04:15:19 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sat, 13 Feb 2016 19:15:19 -0800 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: References: <1603200.SYW0gd2Jir@tjmaciei-mobl4> Message-ID: <2091972.Rreoth4ecW@tjmaciei-mobl4> On domingo, 14 de fevereiro de 2016 02:14:43 PST Nye wrote: > Hello, > Sorry for continuing to bug you with this, but I don't seem to grasp how to > run QCoreApplication in non-blocking mode. That's not what I meant. I meant that you run your APIs in non-blocking mode. There's only one thing in each thread that is allowed to block and that's the main loop, the one that QCoreApplication drives. > Am I correct, or there's a better way? I meant that if you need to poll, you use the aboutToBlock() or awake() signals, and poll at that point. Obviously you won't receive notifications as early as they're available, because the event loop is blocked, waiting. But this is what you have today and you'll have the same functionality without having to use private classes. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Sun Feb 14 04:15:43 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sat, 13 Feb 2016 19:15:43 -0800 Subject: [Interest] What version of VS 2013 (ie which update) is Qt 5.5.1 built with In-Reply-To: References: Message-ID: <6836808.5qvIt2UgJM@tjmaciei-mobl4> On sábado, 13 de fevereiro de 2016 15:42:44 PST Scott Aron Bloom wrote: > While there is a ton of info at > http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x > 86-msvc2013-5.5.1.exe.mirrorlist > http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-> x86-msvc2013_64-5.5.1.exe.mirrorlist > > > I can not find what version of the update (is it 5) is it being built with. > > I have been burned before by being out of step by one update, so I don't > change until all my prebuilt libraries do.... Latest SP available. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From ekke at ekkes-corner.org Sun Feb 14 11:58:35 2016 From: ekke at ekkes-corner.org (ekke) Date: Sun, 14 Feb 2016 11:58:35 +0100 Subject: [Interest] qt.labs.controls - gallery - scrolling gestures and StandardKeys not working from capazitive keyboard Message-ID: <56C05DDB.5030005@ekkes-corner.org> before entering bug issues I wanted to ask if I'm doing something wrong or I forgot to add something to the controls *Scrolling from Capazitive Keyboard* tried with gallery example (ScrollBar) and own code I'm using BlackBerry PRIV (Android 5.1.1) which is a slider where the physical keyboard is a capazitive keyboard wher you can swipe and normally android apps then are scrolling up/down in lists, large pages, webview and more out of the box - per ex. from GMail app, PlayStore, Fotos, ... there are two blogs describing HowTo deal with the keyboard from android apps, where the second one describes the capazitive keyboard: http://devblog.blackberry.com/2015/11/ready-set-type-developers-guide-to-the-priv-keyboard-part-1/ http://devblog.blackberry.com/2015/11/ready-set-type-developers-guide-to-the-priv-keyboard-part-2/ perhaps I have to add more to the controls as ScrollBar{} ? tried to set focus: true - didn't help the keyboard itself was correctly recognized by Qt 5.6: opening the slider - the virtual keyboard disappears and closing it reappears. *Shortcuts* Shortcuts using strings are working :) sequence: "b" sequence: "alt+b" StandardKey unfortunately is not working :( in other apps this is working, per ex. the Delete key is recognized and used to delete something like an email thx -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekke at ekkes-corner.org Sun Feb 14 19:56:53 2016 From: ekke at ekkes-corner.org (ekke) Date: Sun, 14 Feb 2016 19:56:53 +0100 Subject: [Interest] Qt 5.6 and labs.controls for mobile development Message-ID: <56C0CDF5.4030900@ekkes-corner.org> just before starting my blog articles about Qt 5.6 for mobile development have some questions: *Mobile Development for Android, iOS (later W10)* What's the best way to develop for more then one platform from one Qt Creator Project ? read about QtFileSelectors and think they can help with .qml files and also images: placing them in +android, +ios folders I should be able to use different icon sets and do some fine-tuning in UI. For Android the Material styled controls are looking good. Using some iOS - specific icons will help to use Material for iOS apps. Am I right, that using file selectors this selection will happen at runtime ? So always all kinds of resources will be deployed ? And what about CPP code - what's the easiest way to manage different target platforms like Android and iOS ? Thanks for all tips and hints - don't want to publish wrong recipes ;-) *Using different styling (Material vs Universal)* the Qt 5.6 qt.labs.controls Gallery example does the switch at startup using QT_LABS_CONTROLS_STYLE. This works for the qt.labs.controls But as soon as I'm customizing controls I have to... import Qt.labs.controls.material 1.0 .... color: Material.accentColor .... so the customized controls have different code for Material and Universal HowTo deal with this ? Or should I restrict Universal to Windows ? Then I could use the FileSelectors. also having some questions about *add / copy sources and resources* into QtCreator projects: http://forum.qt.io/topic/64163/copy-add-src-files-resources-into-projects and about *automatic creation of translation files*: http://forum.qt.io/topic/64123/localizing-qt-quick-apps -------------- sorry for so many questions, but I want to make it as easy as possible for devs coming from Eclipse as IDE (BlackBerry 10, Cascades, Qt 4.8) or others coming from Eclipse Java / Android Studio to jump into Qt 5.6 to develop crossplatform. last days have intensive studied all the new things possible with Qt 5 - like it. and most I like the qt.labs.controls and HighDPI support for mobile development also good to see that BlackBerry PRIV (Android Device) as Slider was recognized well for most use-cases - only scrolling from capazitive keyboard missing yet. thanks to all devs working on Qt last years - I'll definitive try to use it for a first customer project (BB10, Android, iOS - with Bluetooth LE) -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gr at componic.co.nz Sun Feb 14 21:24:13 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Mon, 15 Feb 2016 09:24:13 +1300 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C0DD3C.4060906@gmail.com> References: <56C0DD3C.4060906@gmail.com> Message-ID: <56C0E26D.5010204@componic.co.nz> Hi, In 5.6 is it still supposed to be possible to build QtWebEngine using -platform macx-clang-32 ? I am seeing errors like this when I attempt it: qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: register %rbp is only available in 64-bit mode pushq %rbp Glenn From nunosantos at imaginando.pt Sun Feb 14 21:35:38 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 14 Feb 2016 20:35:38 +0000 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C0E26D.5010204@componic.co.nz> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> Message-ID: <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> Which source are you using? With 5.6 beta source, -webkit option is not available... > On 14 Feb 2016, at 20:24, Glenn Ramsey wrote: > > Hi, > > In 5.6 is it still supposed to be possible to build QtWebEngine using -platform > macx-clang-32 ? > > I am seeing errors like this when I attempt it: > > qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: > register %rbp is only available in 64-bit mode > pushq %rbp > > Glenn > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From gr at componic.co.nz Sun Feb 14 21:54:18 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Mon, 15 Feb 2016 09:54:18 +1300 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> Message-ID: <56C0E97A.4040607@componic.co.nz> On 15/02/16 09:35, Nuno Santos wrote: > Which source are you using? http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz > > With 5.6 beta source, -webkit option is not available... It's QtWebEngine that I'm trying to build, not QtWebkit. Glenn > >> On 14 Feb 2016, at 20:24, Glenn Ramsey wrote: >> >> Hi, >> >> In 5.6 is it still supposed to be possible to build QtWebEngine using -platform >> macx-clang-32 ? >> >> I am seeing errors like this when I attempt it: >> >> qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: >> register %rbp is only available in 64-bit mode >> pushq %rbp >> >> Glenn >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > From nunosantos at imaginando.pt Sun Feb 14 22:46:59 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 14 Feb 2016 21:46:59 +0000 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C0E97A.4040607@componic.co.nz> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> <56C0E97A.4040607@componic.co.nz> Message-ID: Oh sorry, I mean QtWebEngine. Which option do you use to configure it? Nuno > On 14 Feb 2016, at 20:54, Glenn Ramsey wrote: > > On 15/02/16 09:35, Nuno Santos wrote: >> Which source are you using? > > http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz > >> >> With 5.6 beta source, -webkit option is not available... > > It's QtWebEngine that I'm trying to build, not QtWebkit. > > Glenn > >> >>> On 14 Feb 2016, at 20:24, Glenn Ramsey wrote: >>> >>> Hi, >>> >>> In 5.6 is it still supposed to be possible to build QtWebEngine using -platform >>> macx-clang-32 ? >>> >>> I am seeing errors like this when I attempt it: >>> >>> qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: >>> register %rbp is only available in 64-bit mode >>> pushq %rbp >>> >>> Glenn >>> >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >> >> > From gr at componic.co.nz Sun Feb 14 22:56:22 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Mon, 15 Feb 2016 10:56:22 +1300 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> <56C0E97A.4040607@componic.co.nz> Message-ID: <56C0F806.1040207@componic.co.nz> On 15/02/16 10:46, Nuno Santos wrote: > Oh sorry, I mean QtWebEngine. > > Which option do you use to configure it? ./configure -prefix $PWD/qtbase -platform macx-clang-32 -sdk macosx -c++11 -nomake tests -opensource -confirm-license -no-cups -no-iconv -no-nis -no-xcb -DQWEBENGINEPAGE_UNSUPPORTEDCONTENT -release Glenn > > Nuno > >> On 14 Feb 2016, at 20:54, Glenn Ramsey wrote: >> >> On 15/02/16 09:35, Nuno Santos wrote: >>> Which source are you using? >> >> http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz >> >>> >>> With 5.6 beta source, -webkit option is not available... >> >> It's QtWebEngine that I'm trying to build, not QtWebkit. >> >> Glenn >> >>> >>>> On 14 Feb 2016, at 20:24, Glenn Ramsey wrote: >>>> >>>> Hi, >>>> >>>> In 5.6 is it still supposed to be possible to build QtWebEngine using -platform >>>> macx-clang-32 ? >>>> >>>> I am seeing errors like this when I attempt it: >>>> >>>> qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: >>>> register %rbp is only available in 64-bit mode >>>> pushq %rbp >>>> >>>> Glenn >>>> >>>> _______________________________________________ >>>> Interest mailing list >>>> Interest at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/interest >>> >>> >> > > From nunosantos at imaginando.pt Sun Feb 14 22:58:25 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 14 Feb 2016 21:58:25 +0000 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C0F806.1040207@componic.co.nz> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> <9BE8B5AF-A298-4ACD-8A3C-FEBBDFEC40F0@imaginando.pt> <56C0E97A.4040607@componic.co.nz> <56C0F806.1040207@componic.co.nz> Message-ID: <4AA9DBA2-DD4A-4820-AF73-80344E22FAA6@imaginando.pt> I was interested in static build and I have just been confronted with an error message saying: "Static builds of QtWebEngine aren't supported.” Thanks for sharing your configure line. > On 14 Feb 2016, at 21:56, Glenn Ramsey wrote: > > On 15/02/16 10:46, Nuno Santos wrote: >> Oh sorry, I mean QtWebEngine. >> >> Which option do you use to configure it? > > ./configure -prefix $PWD/qtbase -platform macx-clang-32 -sdk macosx -c++11 > -nomake tests -opensource -confirm-license -no-cups -no-iconv -no-nis -no-xcb > -DQWEBENGINEPAGE_UNSUPPORTEDCONTENT -release > > Glenn > >> >> Nuno >> >>> On 14 Feb 2016, at 20:54, Glenn Ramsey wrote: >>> >>> On 15/02/16 09:35, Nuno Santos wrote: >>>> Which source are you using? >>> >>> http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/single/qt-everywhere-opensource-src-5.6.0-beta.tar.gz >>> >>>> >>>> With 5.6 beta source, -webkit option is not available... >>> >>> It's QtWebEngine that I'm trying to build, not QtWebkit. >>> >>> Glenn >>> >>>> >>>>> On 14 Feb 2016, at 20:24, Glenn Ramsey wrote: >>>>> >>>>> Hi, >>>>> >>>>> In 5.6 is it still supposed to be possible to build QtWebEngine using -platform >>>>> macx-clang-32 ? >>>>> >>>>> I am seeing errors like this when I attempt it: >>>>> >>>>> qtwebengine/src/3rdparty/chromium/base/mac/call_with_eh_frame_asm.S:25:9: error: >>>>> register %rbp is only available in 64-bit mode >>>>> pushq %rbp >>>>> >>>>> Glenn >>>>> >>>>> _______________________________________________ >>>>> Interest mailing list >>>>> Interest at qt-project.org >>>>> http://lists.qt-project.org/mailman/listinfo/interest >>>> >>>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kshegunov at gmail.com Mon Feb 15 06:36:51 2016 From: kshegunov at gmail.com (Nye) Date: Mon, 15 Feb 2016 07:36:51 +0200 Subject: [Interest] Is QEventPrivate a remnant? In-Reply-To: <2091972.Rreoth4ecW@tjmaciei-mobl4> References: <1603200.SYW0gd2Jir@tjmaciei-mobl4> <2091972.Rreoth4ecW@tjmaciei-mobl4> Message-ID: > > That's not what I meant. I meant that you run your APIs in non-blocking > mode. > > There's only one thing in each thread that is allowed to block and that's > the > main loop, the one that QCoreApplication drives. I'm already running the MPI API in non-blocking mode. I meant that if you need to poll, you use the aboutToBlock() or awake() > signals, and poll at that point. Obviously you won't receive notifications > as > early as they're available, because the event loop is blocked, waiting. > > But this is what you have today and you'll have the same functionality > without > having to use private classes. Wouldn't that mean that once aboutToBlock() signal is emitted and I poll for messages, provided I have none the loop will block, and unless I have a system event pending (a timer or a socket/file notifier) it will never unblock? Reading your comment, however, I think that maybe it'd better to poll on a regular timer event (coming from a QTimer) instead of doing it at the low-level ... what do you think? Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel.gaist at edeltech.ch Mon Feb 15 10:53:18 2016 From: samuel.gaist at edeltech.ch (Samuel Gaist) Date: Mon, 15 Feb 2016 10:53:18 +0100 Subject: [Interest] qt.labs.controls Material Toasts In-Reply-To: <71E9C946-F63C-40CB-B1E9-771B2EE6427E@digia.com> References: <56BC56C9.6020203@ekkes-corner.org> <56BC58A4.80807@ekkes-corner.org> <8CE335CB-6F6F-4F88-8710-4C91B372A2EA@edeltech.ch> <71E9C946-F63C-40CB-B1E9-771B2EE6427E@digia.com> Message-ID: <53EE573F-7564-431D-BCEB-E3844E64CFEE@edeltech.ch> Hi, Ok, I see what you mean :) I was asking because I've started some time ago to implement (early WIP) a pluggable notification system for Qt so I was wondering if it could benefit to these custom notifications. If interested, you can take a look at https://codereview.qt-project.org/#/c/97068/ It's not ready yet but the more inputs the better :) Samuel On 12 févr. 2016, at 16:17, Nurmi J-P wrote: > Hi Samuel, > > We’ll probably leave the native notification system integration job to the platform extras or other modules. The new controls are built upon so called Qt Quick templates, and the whole styling system is heavily based on Qt Quick. They are all fully cross-platform styles implementing specific design languages. They are not pretending to be native styles, because there’s actually nothing native there. Bridging native controls doesn’t fit very well into the picture of this project. If we wanted to go native, direct QML bindings to native controls would be my preferred solution. It would be a parallel offering, not mixed with Qt Quick. :) > > -- > J-P Nurmi > > > >> On 12 Feb 2016, at 13:50, Samuel Gaist wrote: >> >> Hi, >> >> Out of curiosity, should that be driven by the OS notification system ? >> >> Samuel >> >> On 11 févr. 2016, at 16:45, Nurmi J-P wrote: >> >>> Hi, >>> >>> We would definitely like to extend our offering with some sort of tooltips and notification banners in the future. We might prefer stick to the terminology Qt and Qt Quick have used in the past, so we probably won’t end up calling them snackbars, toasts, or anything else as delicious, though. :) >>> >>> I have filed suggestions for both so they don’t get forgotten: >>> - https://bugreports.qt.io/browse/QTBUG-51003 >>> - https://bugreports.qt.io/browse/QTBUG-51060 >>> >>> -- >>> J-P Nurmi >>> >>> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of ekke >>> Sent: Thursday, February 11, 2016 10:47 >>> To: interest at qt-project.org >>> Subject: Re: [Interest] qt.labs.controls Material Toasts >>> >>> sorry, was an old link - this one is the actual one: >>> https://www.google.com/design/spec/components/snackbars-toasts.html >>> >>> Am 11.02.16 um 10:39 schrieb ekke: >>> Hi, >>> >>> are there any plans to provide Snackbars and Toasts out of the box ? >>> http://blog.chengyunfeng.com/design/spec/components/snackbars-and-toasts.html >>> >>> or do I have to implement them by trying to customize existing controls ? >>> >>> thx >>> -- >>> ekke (ekkehard gentz) >>> >>> independent software architect >>> international development native mobile business apps >>> BlackBerry 10 | Qt Mobile (Android, iOS) >>> workshops - trainings - bootcamps >>> >>> BlackBerry Elite Developer >>> BlackBerry Platinum Enterprise Partner >>> >>> max-josefs-platz 30, D-83022 rosenheim, germany >>> mailto:ekke at ekkes-corner.org >>> blog: http://ekkes-corner.org >>> apps and more: http://appbus.org >>> >>> twitter: @ekkescorner >>> skype: ekkes-corner >>> LinkedIn: http://linkedin.com/in/ekkehard/ >>> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 >>> >>> >>> >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >>> >>> >>> -- >>> ekke (ekkehard gentz) >>> >>> independent software architect >>> international development native mobile business apps >>> BlackBerry 10 | Qt Mobile (Android, iOS) >>> workshops - trainings - bootcamps >>> >>> BlackBerry Elite Developer >>> BlackBerry Platinum Enterprise Partner >>> >>> max-josefs-platz 30, D-83022 rosenheim, germany >>> mailto:ekke at ekkes-corner.org >>> blog: http://ekkes-corner.org >>> apps and more: http://appbus.org >>> >>> twitter: @ekkescorner >>> skype: ekkes-corner >>> LinkedIn: http://linkedin.com/in/ekkehard/ >>> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >> > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Message signed with OpenPGP using GPGMail URL: From Kai.Koehne at theqtcompany.com Mon Feb 15 12:01:10 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 15 Feb 2016 11:01:10 +0000 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C0E26D.5010204@componic.co.nz> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> Message-ID: > -----Original Message----- > From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Glenn > Ramsey > Sent: Sunday, February 14, 2016 9:24 PM > To: interest at qt-project.org > Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit > > Hi, > > In 5.6 is it still supposed to be possible to build QtWebEngine using - > platform > macx-clang-32 ? No, it's not. Upstream Chromium/Chrome dropped support a while ago: http://googleappsupdates.blogspot.co.uk/2014/09/google-chrome-64-bit-for-mac-and-windows.html We'll document this. Regards Kai From jpnurmi at theqtcompany.com Mon Feb 15 13:50:08 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Mon, 15 Feb 2016 12:50:08 +0000 Subject: [Interest] Qt 5.6 and labs.controls for mobile development In-Reply-To: <56C0CDF5.4030900@ekkes-corner.org> References: <56C0CDF5.4030900@ekkes-corner.org> Message-ID: Hi, > On 14 Feb 2016, at 19:56, ekke wrote: > > just before starting my blog articles about Qt 5.6 for mobile development have some questions: > > Mobile Development for Android, iOS (later W10) > What's the best way to develop for more then one platform from one Qt Creator Project ? > read about QtFileSelectors and think they can help with .qml files and also images: > placing them in +android, +ios folders I should be able to use different icon sets and do some fine-tuning in UI. > For Android the Material styled controls are looking good. > Using some iOS - specific icons will help to use Material for iOS apps. > Am I right, that using file selectors this selection will happen at runtime ? Yes, the selection happens at runtime. > So always all kinds of resources will be deployed ? Sharing and separating platform specific resources can be done by using platform scopes in the .pro file. # resources that apply to all platforms RESOURCES += myapp.qrc # Android specific resources android: RESOURCES += myapp_android.qrc # iOS specific resources ios: RESOURCES += myapp_ios.qrc > And what about CPP code - what's the easiest way to manage different target platforms like Android and iOS ? You could use the Q_OS_* macros (eg. Q_OS_ANDROID) for smaller platform specific code blocks. If you have more complex platform specific features, it’s usually better to have separate source files (eg. myfeature_android.cpp) and use the same technique than shown above for resources. > Thanks for all tips and hints - don't want to publish wrong recipes ;-) > > Using different styling (Material vs Universal) > the Qt 5.6 qt.labs.controls Gallery example does the switch at startup using QT_LABS_CONTROLS_STYLE. > This works for the qt.labs.controls > But as soon as I'm customizing controls I have to... > import Qt.labs.controls.material 1.0 > .... > color: Material.accentColor > .... > so the customized controls have different code for Material and Universal > HowTo deal with this ? > Or should I restrict Universal to Windows ? Then I could use the FileSelectors. We’re working on adding the style names as built-in selectors, so in the future you could have MyPage.qml, +material/MyPage and +universal/MyPage.qml if you want to do more complex style specific tweaks. -- J-P Nurmi From jpnurmi at theqtcompany.com Mon Feb 15 13:52:12 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Mon, 15 Feb 2016 12:52:12 +0000 Subject: [Interest] qt.labs.controls - gallery - scrolling gestures and StandardKeys not working from capazitive keyboard In-Reply-To: <56C05DDB.5030005@ekkes-corner.org> References: <56C05DDB.5030005@ekkes-corner.org> Message-ID: <68C97B24-27A8-48DF-A1A2-A57BE4406D65@digia.com> > On 14 Feb 2016, at 11:58, ekke wrote: > > before entering bug issues I wanted to ask if I'm doing something wrong or I forgot to add something to the controls > > Scrolling from Capazitive Keyboard > tried with gallery example (ScrollBar) and own code > > I'm using BlackBerry PRIV (Android 5.1.1) which is a slider where the physical keyboard is a capazitive keyboard wher you can swipe and normally android apps then are scrolling up/down in lists, large pages, webview and more out of the box - per ex. from GMail app, PlayStore, Fotos, ... > > there are two blogs describing HowTo deal with the keyboard from android apps, where the second one describes the capazitive keyboard: > http://devblog.blackberry.com/2015/11/ready-set-type-developers-guide-to-the-priv-keyboard-part-1/ > http://devblog.blackberry.com/2015/11/ready-set-type-developers-guide-to-the-priv-keyboard-part-2/ > > perhaps I have to add more to the controls as ScrollBar{} ? > tried to set focus: true - didn't help > > the keyboard itself was correctly recognized by Qt 5.6: > opening the slider - the virtual keyboard disappears and closing it reappears. > > Shortcuts > Shortcuts using strings are working :) > sequence: "b" > sequence: "alt+b" > > StandardKey unfortunately is not working :( > in other apps this is working, per ex. the Delete key is recognized and used to delete something like an email Sounds like worth opening bug reports. There we can dig into details. Thanks! :) -- J-P Nurmi From jhihn at gmx.com Mon Feb 15 18:24:48 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 15 Feb 2016 18:24:48 +0100 Subject: [Interest] Speeding up linking for iOS? Message-ID: It takes forever for my app to link for iOS. Is there anyway to speed this up? From gr at componic.co.nz Mon Feb 15 20:01:14 2016 From: gr at componic.co.nz (Glenn Ramsey) Date: Tue, 16 Feb 2016 08:01:14 +1300 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> Message-ID: <56C2207A.9060804@componic.co.nz> On 16/02/16 00:01, Koehne Kai wrote: > > >> -----Original Message----- >> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Glenn >> Ramsey >> Sent: Sunday, February 14, 2016 9:24 PM >> To: interest at qt-project.org >> Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit >> >> Hi, >> >> In 5.6 is it still supposed to be possible to build QtWebEngine using - >> platform >> macx-clang-32 ? > > No, it's not. Upstream Chromium/Chrome dropped support a while ago: Thanks. This means that 5.5.1 shouldn't have been able to build with macx-clang-32 either, but it does and seems to work Ok. > http://googleappsupdates.blogspot.co.uk/2014/09/google-chrome-64-bit-for-mac-and-windows.html > > We'll document this. Ideally the configure or build system should complain if you attempt to do it. That would save a lot of time. Glenn From annulen at yandex.ru Mon Feb 15 20:03:29 2016 From: annulen at yandex.ru (Konstantin Tokarev) Date: Mon, 15 Feb 2016 22:03:29 +0300 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <56C2207A.9060804@componic.co.nz> References: <56C0DD3C.4060906@gmail.com> <56C0E26D.5010204@componic.co.nz> <56C2207A.9060804@componic.co.nz> Message-ID: <646531455563009@web26m.yandex.ru> 15.02.2016, 22:01, "Glenn Ramsey" : > On 16/02/16 00:01, Koehne Kai wrote: >>>  -----Original Message----- >>>  From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Glenn >>>  Ramsey >>>  Sent: Sunday, February 14, 2016 9:24 PM >>>  To: interest at qt-project.org >>>  Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit >>> >>>  Hi, >>> >>>  In 5.6 is it still supposed to be possible to build QtWebEngine using - >>>  platform >>>  macx-clang-32 ? >> >>  No, it's not. Upstream Chromium/Chrome dropped support a while ago: > > Thanks. This means that 5.5.1 shouldn't have been able to build with > macx-clang-32 either, but it does and seems to work Ok. QtWebEngine in 5.5.1 used older Chromium version. > >>  http://googleappsupdates.blogspot.co.uk/2014/09/google-chrome-64-bit-for-mac-and-windows.html >> >>  We'll document this. > > Ideally the configure or build system should complain if you attempt to do it. > That would save a lot of time. > > Glenn > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- Regards, Konstantin From kde at carewolf.com Mon Feb 15 22:17:09 2016 From: kde at carewolf.com (Allan Sandfeld Jensen) Date: Mon, 15 Feb 2016 22:17:09 +0100 Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit In-Reply-To: <646531455563009@web26m.yandex.ru> References: <56C0DD3C.4060906@gmail.com> <56C2207A.9060804@componic.co.nz> <646531455563009@web26m.yandex.ru> Message-ID: <201602152217.09978.kde@carewolf.com> On Monday 15 February 2016, Konstantin Tokarev wrote: > 15.02.2016, 22:01, "Glenn Ramsey" : > > On 16/02/16 00:01, Koehne Kai wrote: > >>> -----Original Message----- > >>> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of > >>> Glenn Ramsey > >>> Sent: Sunday, February 14, 2016 9:24 PM > >>> To: interest at qt-project.org > >>> Subject: [Interest] QtWebEngine in 5.6 OSX 32 bit > >>> > >>> Hi, > >>> > >>> In 5.6 is it still supposed to be possible to build QtWebEngine using > >>> - platform > >>> macx-clang-32 ? > >> > >> No, it's not. Upstream Chromium/Chrome dropped support a while ago: > > Thanks. This means that 5.5.1 shouldn't have been able to build with > > macx-clang-32 either, but it does and seems to work Ok. > > QtWebEngine in 5.5.1 used older Chromium version. > Yes, but 5.5 still used Chromium 40, and supposedly Google removed official 32-bit support for Mac in Chromium 39, but I guess it took a few versions before anything broke from the lack of deliberate support. Regards `Allan From thiago.macieira at intel.com Mon Feb 15 23:00:16 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 15 Feb 2016 14:00:16 -0800 Subject: [Interest] Speeding up linking for iOS? In-Reply-To: References: Message-ID: <5454498.QmPAIvzqeF@tjmaciei-mobl4> On segunda-feira, 15 de fevereiro de 2016 18:24:48 PST Jason H wrote: > It takes forever for my app to link for iOS. Is there anyway to speed this > up? Upgrade to 5.7 and start using the shared library build of Qt for iOS. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From bhood2 at comcast.net Mon Feb 15 23:22:24 2016 From: bhood2 at comcast.net (Bob Hood) Date: Mon, 15 Feb 2016 15:22:24 -0700 Subject: [Interest] Speeding up linking for iOS? In-Reply-To: <5454498.QmPAIvzqeF@tjmaciei-mobl4> References: <5454498.QmPAIvzqeF@tjmaciei-mobl4> Message-ID: <56C24FA0.5040908@comcast.net> On 2/15/2016 3:00 PM, Thiago Macieira wrote: > On segunda-feira, 15 de fevereiro de 2016 18:24:48 PST Jason H wrote: >> It takes forever for my app to link for iOS. Is there anyway to speed this >> up? > Upgrade to 5.7 and start using the shared library build of Qt for iOS. 5.7? Did I miss an entire release of Qt? I only see 5.5 as the highest available in the official releases download. From thiago.macieira at intel.com Mon Feb 15 23:44:59 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 15 Feb 2016 14:44:59 -0800 Subject: [Interest] Speeding up linking for iOS? In-Reply-To: <56C24FA0.5040908@comcast.net> References: <5454498.QmPAIvzqeF@tjmaciei-mobl4> <56C24FA0.5040908@comcast.net> Message-ID: <2508206.OihkRIzxTN@tjmaciei-mobl4> On segunda-feira, 15 de fevereiro de 2016 15:22:24 PST Bob Hood wrote: > On 2/15/2016 3:00 PM, Thiago Macieira wrote: > > On segunda-feira, 15 de fevereiro de 2016 18:24:48 PST Jason H wrote: > >> It takes forever for my app to link for iOS. Is there anyway to speed > >> this > >> up? > > > > Upgrade to 5.7 and start using the shared library build of Qt for iOS. > > 5.7? Did I miss an entire release of Qt? I only see 5.5 as the highest > available in the official releases download. No, you did not. Qt 5.6.0 is not yet released, but this feature is not available there. And I was actually wrong: this is not in Qt 5.7. This will be present in Qt 5.8 only (it's not yet ready). For more information, see https://codereview.qt-project.org/123023 -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From ekke at ekkes-corner.org Tue Feb 16 00:02:43 2016 From: ekke at ekkes-corner.org (ekke) Date: Tue, 16 Feb 2016 00:02:43 +0100 Subject: [Interest] qt.labs.controls and colors Message-ID: <56C25913.8070304@ekkes-corner.org> Hi, as I understand it right, I can define two colors for Material: * primary * accent and one for Universal : accent. At the moment I'm only focussing on Material. to follow Android Material Design Guide I also need a darker and lighter variation of primary is it ok, to do it this way: Qt.lighter(Material.accentColor, 1.1) Qt.darker(Material.accentColor, 1.1) as next I need some more colors: * primaryText and secondaryText (depends from light or dark theme) * textColorPrimary (textcolor used for text placed on primary color) as from documentation there's nothing generated / prepared from Qt Material so I have to create these colors by myself and then use thru the app ? what's the best in respect of performance and memory ? should I define these colors in my root qml as property and use this property thru the app ? color: root.secondaryTextColor last question: Is there a way to set the *Android Status Bar* color (Primary Dark) ? http://developer.android.com/training/material/theme.html#StatusBar thx -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at ohufx.com Tue Feb 16 00:21:02 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Tue, 16 Feb 2016 12:21:02 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX Message-ID: <56C25D5E.1090701@ohufx.com> Hi, I am trying to figure out my host application's window geometry reliably and am struggling a bit. I use QApplication.activeWindow().geometry() to drive my custom widget's geometry (I need to sit exactly on top of the host application). All works fine and my widget sits exactly on top of the host application window, until the host app is scaled by dragging one of it's sides out or in. After that QApplication.activeWindow().geometry() still returns the same exact position, though the size is correct, resulting in an offset for my widget. Turns out scaling windows on OSX by dragging their edges doesn't seem to update QApplication.activeWindow().pos() As soon as I grab the title bar and move the host app a tiny bit, QApplication.activeWindow().pos() seems to be updated correctly. Is there a fix/workaround for this? Cheers, frank -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From igor.mironchik at gmail.com Tue Feb 16 09:57:51 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Tue, 16 Feb 2016 11:57:51 +0300 Subject: [Interest] QGraphicsItem and QPointer analog Message-ID: <56C2E48F.8020605@gmail.com> Hi folks, Let's say you need a group and some move/resize handles for this group (I'm talking about QGraphicsView). Such handles can't be children of the group because then they won't receive any mouse events. So you have to set parent of such handles to group's parent. Easy? Yes! But it's not easy to correct destroy of such handles if you allow user to select group and delete it. On such deletion you have to delete handles of the group too. It's possible to do, but in very old C++ style, even C style :) It would be much more better to have something similar to QPointer but for QGraphicsItem, i.e. QGraphicsPointer... With such technique you can check in dtor if handles was already removed (i.e. was normal destruction of the entire scene) and don't delete already deleted items, and you don't need to have something like destroyHandles() method of your group and on single deletion you don't need to invoke this method... What do you think? From nunosantos at imaginando.pt Tue Feb 16 13:21:53 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Tue, 16 Feb 2016 12:21:53 +0000 Subject: [Interest] Integrating Paypal payments inside Qt app without having QWebView available Message-ID: <014E2C31-6CC9-48BA-AF4B-40C93C4F171A@imaginando.pt> Hi, Has anyone here integrated Paypal payments into a Qt app? And without having QWebView available? Is it possible to open the Paypal checkout window on the system browser and somehow get the result into the app? This is for desktop only. I want to implement a payment system similar to the one that will be available on the mobile versions of the app. I’m currently out of ideas on how to implement this without QWebView. Thanks, Nuno From konstantin at podsvirov.pro Tue Feb 16 21:42:49 2016 From: konstantin at podsvirov.pro (Konstantin Podsvirov) Date: Tue, 16 Feb 2016 23:42:49 +0300 Subject: [Interest] Qt Charts 2.0.1 with Qt 5.5 for msvc2013 32-bit and 64-bit Message-ID: <2128321455655369@web27h.yandex.ru> As mentioned here: http://blog.qt.io/blog/2016/01/18/qt-charts-2-1-0-release 5.6 Qt will include the new addition of Qt Charts. However, only in the form of source code. Pre-built add-in is available with a commercial license now. Everyone can build from source: http://code.qt.io/cgit/qt/qtcharts.git Sharing some it can be a daunting task (I hope few). I show interest in "Qt Installer Framework": http://doc.qt.io/qtinstallerframework/index.html In my spare time I improve integration with CMake: https://cmake.org/cmake/help/latest/module/CPackIFW.html Developers Qt SDK has its own set of tools: http://code.qt.io/cgit/qtsdk/qtsdk.git I think I deviated from the main topic. I decided to share a couple of options to build the Qt Charts for Windows using the standard online installer Qt. All you need is: * run the Qt Maintenance Tool * to select Add or Remove Components * open Settings dialog * add repository with url http://download.podsvirov.pro/online/qtsdkrepository/windows_x86/desktop/qt5_55_qtcharts Now for Qt 5.5, you can install add-Qt Charts. It works for me - hope that will work for you. -- Regards, Konstantin Podsvirov From ekke at ekkes-corner.org Tue Feb 16 22:28:04 2016 From: ekke at ekkes-corner.org (ekke) Date: Tue, 16 Feb 2016 22:28:04 +0100 Subject: [Interest] qt.labs.controls and colors In-Reply-To: <56C25913.8070304@ekkes-corner.org> References: <56C25913.8070304@ekkes-corner.org> Message-ID: <56C39464.30300@ekkes-corner.org> just found out that there are already many colors implemented http://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/src/imports/controls/material/qquickmaterialstyle_p.h they're marked as internal think I'll define all colors I need at root and where possible use the internal colors from materialstyle if they should go away one day I'll have only one place to change less work as replicating all the color-calculations already done Am 16.02.16 um 00:02 schrieb ekke: > Hi, > > as I understand it right, I can define two colors for Material: > > * primary > * accent > > and one for Universal : accent. > > At the moment I'm only focussing on Material. > to follow Android Material Design Guide I also need a darker and > lighter variation of primary > is it ok, to do it this way: > > Qt.lighter(Material.accentColor, 1.1) > Qt.darker(Material.accentColor, 1.1) > > as next I need some more colors: > > * primaryText and secondaryText (depends from light or dark theme) > * textColorPrimary (textcolor used for text placed on primary color) > > > as from documentation there's nothing generated / prepared from Qt > Material > so I have to create these colors by myself and then use thru the app ? > > what's the best in respect of performance and memory ? > should I define these colors in my root qml as property and use this > property thru the app ? > > color: root.secondaryTextColor > > last question: > Is there a way to set the *Android Status Bar* color (Primary Dark) ? > http://developer.android.com/training/material/theme.html#StatusBar > > thx -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From etienne.sandre at m4x.org Wed Feb 17 09:33:33 2016 From: etienne.sandre at m4x.org (=?UTF-8?Q?Etienne_Sandr=C3=A9=2DChardonnal?=) Date: Wed, 17 Feb 2016 09:33:33 +0100 Subject: [Interest] Using libpng with Qt Message-ID: Hi, I need to use libpng directly (for handling 16-bit depth & custom color spaces correctly) in a Qt application. >From your experience, what is the best way? Is it possible to use the libpng from Qt, or is it better to use a separately built libpng? This could lead to duplicate symbols when linking. Thanks! Etienne -------------- next part -------------- An HTML attachment was scrubbed... URL: From nunosantos at imaginando.pt Wed Feb 17 13:59:48 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 17 Feb 2016 12:59:48 +0000 Subject: [Interest] Embedding QMacNativeWidget into native window steals keyboard input Message-ID: <75FA9DAA-BA3A-42A1-853B-AF88F85A7CB6@imaginando.pt> Hi, I’m embedding a QMacNativeWidget into another application plugin window. Before embedding, the plugin window doesn’t do anything with the keyboard input, so, it flows down to the host, performing utility and important functions. As soon as I embed the QMacNativeWidget into into the plugin window, the keyboard is not received by the host anymore. I have been trying to read about widget and window flags and trying a lot of them without luck. Also, the window close button doesn’t work anymore. Does anyone knows how can I prevent this behaviour? Below is the code I use to embed the QMacNativeWidget into the host plugin window: QMacNativeWidget *nativeWidget = new QMacNativeWidget(); nativeWidget->setPalette(QPalette(Qt::red)); nativeWidget->setAutoFillBackground(true); nativeWidget->setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus | Qt::WindowCloseButtonHint); nativeWidget->clearFocus(); nativeWidget->releaseKeyboard(); nativeWidget->setAttribute(Qt::WA_ShowWithoutActivating); nativeWidget->setAttribute(Qt::WA_NativeWindow); NSView *nativeWidgetView = reinterpret_cast(nativeWidget->winId()); if ([view isKindOfClass:[NSView class]]) { [view addSubview:nativeWidgetView]; } else { #ifdef USE_CARBON_WINDOW HIRect frame; HIViewRef content; WindowRef w= (WindowRef) ptr; HIViewFindByID(HIViewGetRoot(w), kHIViewWindowContentID, &content); HIViewGetFrame(content, &frame); frame.origin.x=0; frame.origin.y=0; HICocoaViewCreate(0, 0, &hiCocoaView); HIViewSetFrame(hiCocoaView, &frame); HIViewAddSubview(content, hiCocoaView); HICocoaViewSetView(hiCocoaView, nativeWidgetView); #endif } nativeWidget->show(); Nuno -------------- next part -------------- An HTML attachment was scrubbed... URL: From konstantin at podsvirov.pro Wed Feb 17 19:24:37 2016 From: konstantin at podsvirov.pro (Konstantin Podsvirov) Date: Wed, 17 Feb 2016 21:24:37 +0300 Subject: [Interest] Qt Charts 2.0.1 with Qt 5.5 for MinGW 4.9.2 32-bit In-Reply-To: <2128321455655369@web27h.yandex.ru> References: <2128321455655369@web27h.yandex.ru> Message-ID: <258751455733477@web30h.yandex.ru> Today I built another port Qt Charts for MinGW 4.9.2 32-bit on Windows. And it works for me. Should work for you. If you already tried to msvc2013, then just uninstall and then again add Qt Charts via the Qt Maintenance Tool. I will be glad reviews and suggestions. Details below. 16.02.2016, 23:43, "Konstantin Podsvirov" : > As mentioned here: > > http://blog.qt.io/blog/2016/01/18/qt-charts-2-1-0-release > > 5.6 Qt will include the new addition of Qt Charts. However, only in the form of source code. > Pre-built add-in is available with a commercial license now. > > Everyone can build from source: > > http://code.qt.io/cgit/qt/qtcharts.git > > Sharing some of it can be a daunting task (I hope few). > > I show interest in "Qt Installer Framework": > > http://doc.qt.io/qtinstallerframework/index.html > > In my spare time I improve integration with CMake: > > https://cmake.org/cmake/help/latest/module/CPackIFW.html > > Developers Qt SDK has its own set of tools: > > http://code.qt.io/cgit/qtsdk/qtsdk.git > > I think I deviated from the main topic. I decided to share a couple of options to build the Qt Charts for Windows > using the standard online installer Qt. > > All you need is: > > * run the Qt Maintenance Tool > * to select Add or Remove Components > * open Settings dialog > * add repository with url > > http://download.podsvirov.pro/online/qtsdkrepository/windows_x86/desktop/qt5_55_qtcharts > > Now for Qt 5.5, you can install add-Qt Charts. > > It works for me - hope that will work for you. > > -- > Regards, > Konstantin Podsvirov > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest Regards, Konstantin Podsvirov From frank at ohufx.com Wed Feb 17 22:14:08 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 18 Feb 2016 10:14:08 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <56C25D5E.1090701@ohufx.com> References: <56C25D5E.1090701@ohufx.com> Message-ID: <56C4E2A0.9050304@ohufx.com> anybody? is this a bug? On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: > Hi, > > I am trying to figure out my host application's window geometry > reliably and am struggling a bit. > > I use QApplication.activeWindow().geometry() to drive my custom > widget's geometry (I need to sit exactly on top of the host application). > All works fine and my widget sits exactly on top of the host > application window, until the host app is scaled by dragging one of > it's sides out or in. After that > QApplication.activeWindow().geometry() still returns the same exact > position, though the size is correct, resulting in an offset for my > widget. > Turns out scaling windows on OSX by dragging their edges doesn't seem > to update QApplication.activeWindow().pos() > > As soon as I grab the title bar and move the host app a tiny bit, > QApplication.activeWindow().pos() seems to be updated correctly. > > Is there a fix/workaround for this? > > Cheers, > frank > > -- > ohufxLogo 50x50 *vfx compositing > | *workflow customisation > and consulting * * > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Thu Feb 18 04:20:37 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 18 Feb 2016 16:20:37 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> Message-ID: <56C53885.7080802@ohufx.com> Hi Tony, sorry, let me clarify: QT's co-oridnate system starts at the top left, right? So when I scale the window by dragging the left side (or the top), the point of origin changes and thus I expect a different global position for the widget. The reason I am tying to determine the exact geometry of the parent application is because I am trying to implement something like an invisible slider, a mode where the use can click+drag anywhere in the host application to change a certain value. Upon release the mode disables itself until a hotkey is pressed again. E.g. if the host application is a video player, I am trying to implement a mode where the user can hit a hotkey, then click&drag anywhere in the player to scrub through the video. I'm sure there are better ways to go about this (and I'd love to hear advise on this), but at the moment, as a proof of concept, I am creating a transparent widget that catches the mouse event and emits the required signal, and I'd like for that widget to perfectly sit on top of the parent app so if the user click/drags outside of it, it won't have any effect. Ideally I'd just force the mouse event to my QObject rather than create an transparent widget, but I don't know if this is possible? Does that make sense? Cheers, frank On 18/02/16 3:59 pm, Tony Rietwyk wrote: > > Hi Frank, > > I don't understand what you are asking! Why do you expect that > changing the window size will change the position? You say 'resulting > in an offset for my widget' - sounds like you are adding the new pos > instead of just using it? > > Tracking foreign native windows is pretty rare. You need to provide a > cut-down version of what you are doing so others can easily run it. > > Regards, > > Tony > > *From:*Interest > [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Thursday, 18 February 2016 8:14 AM > *To:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > anybody? > is this a bug? > > On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: > > Hi, > > I am trying to figure out my host application's window geometry > reliably and am struggling a bit. > > I use QApplication.activeWindow().geometry() to drive my custom > widget's geometry (I need to sit exactly on top of the host > application). > All works fine and my widget sits exactly on top of the host > application window, until the host app is scaled by dragging one > of it's sides out or in. After that > QApplication.activeWindow().geometry() still returns the same > exact position, though the size is correct, resulting in an offset > for my widget. > Turns out scaling windows on OSX by dragging their edges doesn't > seem to update QApplication.activeWindow().pos() > > As soon as I grab the title bar and move the host app a tiny bit, > QApplication.activeWindow().pos() seems to be updated correctly. > > Is there a fix/workaround for this? > > Cheers, > frank > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > > > > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From tony at rightsoft.com.au Thu Feb 18 04:59:57 2016 From: tony at rightsoft.com.au (Tony Rietwyk) Date: Thu, 18 Feb 2016 14:59:57 +1100 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <56C53885.7080802@ohufx.com> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> Message-ID: <003f01d16a00$d5731b90$805952b0$@rightsoft.com.au> Hi Frank - sorry for replying to you directly before! Have you looked at event filtering? A derived QObject can monitor, and supress events going to another QObject - including windows. So: - when the hot key occurs, you installEventFilter on the current window, - if KeyPress Esc, then cancel, - if MousePress, then record start pos, - if MouseMove, then record the end pos - if MouseRelease, then record the end pos and finish When you finish or cancel, removeEventFilter. While active, you always suppress the event to stop if going to the target window. Hope that helps, Tony From: Frank Rueter | OHUfx [mailto:frank at ohufx.com] Sent: Thursday, 18 February 2016 2:21 PM To: Tony Rietwyk Cc: interest at qt-project.org Subject: Re: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX Hi Tony, sorry, let me clarify: QT's co-oridnate system starts at the top left, right? So when I scale the window by dragging the left side (or the top), the point of origin changes and thus I expect a different global position for the widget. The reason I am tying to determine the exact geometry of the parent application is because I am trying to implement something like an invisible slider, a mode where the use can click+drag anywhere in the host application to change a certain value. Upon release the mode disables itself until a hotkey is pressed again. E.g. if the host application is a video player, I am trying to implement a mode where the user can hit a hotkey, then click&drag anywhere in the player to scrub through the video. I'm sure there are better ways to go about this (and I'd love to hear advise on this), but at the moment, as a proof of concept, I am creating a transparent widget that catches the mouse event and emits the required signal, and I'd like for that widget to perfectly sit on top of the parent app so if the user click/drags outside of it, it won't have any effect. Ideally I'd just force the mouse event to my QObject rather than create an transparent widget, but I don't know if this is possible? Does that make sense? Cheers, frank On 18/02/16 3:59 pm, Tony Rietwyk wrote: Hi Frank, I don't understand what you are asking! Why do you expect that changing the window size will change the position? You say 'resulting in an offset for my widget' - sounds like you are adding the new pos instead of just using it? Tracking foreign native windows is pretty rare. You need to provide a cut-down version of what you are doing so others can easily run it. Regards, Tony From: Interest [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of Frank Rueter | OHUfx Sent: Thursday, 18 February 2016 8:14 AM To: interest at qt-project.org Subject: Re: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX anybody? is this a bug? On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: Hi, I am trying to figure out my host application's window geometry reliably and am struggling a bit. I use QApplication.activeWindow().geometry() to drive my custom widget's geometry (I need to sit exactly on top of the host application). All works fine and my widget sits exactly on top of the host application window, until the host app is scaled by dragging one of it's sides out or in. After that QApplication.activeWindow().geometry() still returns the same exact position, though the size is correct, resulting in an offset for my widget. Turns out scaling windows on OSX by dragging their edges doesn't seem to update QApplication.activeWindow().pos() As soon as I grab the title bar and move the host app a tiny bit, QApplication.activeWindow().pos() seems to be updated correctly. Is there a fix/workaround for this? Cheers, frank -- ohufxLogo 50x50 vfx compositing | workflow customisation and consulting _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- ohufxLogo 50x50 vfx compositing | workflow customisation and consulting -- ohufxLogo 50x50 vfx compositing | workflow customisation and consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2666 bytes Desc: not available URL: From scott at towel42.com Thu Feb 18 05:33:45 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 18 Feb 2016 04:33:45 +0000 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <56C53885.7080802@ohufx.com> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> Message-ID: In the docs for QWidget::geometry() it says whats going on here.. http://doc.qt.io/qt-5/qwidget.html#geometry-prop "This property holds the geometry of the widget relative to its parent and excluding the window frame." It does NOT return a global position, if you want a global position, you must convert to the global via http://doc.qt.io/qt-5/application-windows.html#window-geometry should be read to learn what geometry represents. If you know the parent, you can use parent->mapToGlobal( QRect ) to find the global rectangle. Scott From: Interest [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Frank Rueter | OHUfx Sent: Wednesday, February 17, 2016 19:21 To: Tony Rietwyk Cc: interest at qt-project.org Subject: Re: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX Hi Tony, sorry, let me clarify: QT's co-oridnate system starts at the top left, right? So when I scale the window by dragging the left side (or the top), the point of origin changes and thus I expect a different global position for the widget. The reason I am tying to determine the exact geometry of the parent application is because I am trying to implement something like an invisible slider, a mode where the use can click+drag anywhere in the host application to change a certain value. Upon release the mode disables itself until a hotkey is pressed again. E.g. if the host application is a video player, I am trying to implement a mode where the user can hit a hotkey, then click&drag anywhere in the player to scrub through the video. I'm sure there are better ways to go about this (and I'd love to hear advise on this), but at the moment, as a proof of concept, I am creating a transparent widget that catches the mouse event and emits the required signal, and I'd like for that widget to perfectly sit on top of the parent app so if the user click/drags outside of it, it won't have any effect. Ideally I'd just force the mouse event to my QObject rather than create an transparent widget, but I don't know if this is possible? Does that make sense? Cheers, frank On 18/02/16 3:59 pm, Tony Rietwyk wrote: Hi Frank, I don't understand what you are asking! Why do you expect that changing the window size will change the position? You say 'resulting in an offset for my widget' - sounds like you are adding the new pos instead of just using it? Tracking foreign native windows is pretty rare. You need to provide a cut-down version of what you are doing so others can easily run it. Regards, Tony From: Interest [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of Frank Rueter | OHUfx Sent: Thursday, 18 February 2016 8:14 AM To: interest at qt-project.org Subject: Re: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX anybody? is this a bug? On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: Hi, I am trying to figure out my host application's window geometry reliably and am struggling a bit. I use QApplication.activeWindow().geometry() to drive my custom widget's geometry (I need to sit exactly on top of the host application). All works fine and my widget sits exactly on top of the host application window, until the host app is scaled by dragging one of it's sides out or in. After that QApplication.activeWindow().geometry() still returns the same exact position, though the size is correct, resulting in an offset for my widget. Turns out scaling windows on OSX by dragging their edges doesn't seem to update QApplication.activeWindow().pos() As soon as I grab the title bar and move the host app a tiny bit, QApplication.activeWindow().pos() seems to be updated correctly. Is there a fix/workaround for this? Cheers, frank -- [ohufxLogo 50x50] vfx compositing | workflow customisation and consulting _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- [ohufxLogo 50x50] vfx compositing | workflow customisation and consulting -- [ohufxLogo 50x50] vfx compositing | workflow customisation and consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2666 bytes Desc: image001.png URL: From frank at ohufx.com Thu Feb 18 05:44:25 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 18 Feb 2016 17:44:25 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> Message-ID: <56C54C29.3050407@ohufx.com> Thanks Scott, I'm pretty sure I tried that but I will give it another go. My transparent widget is parented to the parent app, so geometry() should return all I need to know. Also, the fact that moving the parent window slightly makes geometry() return the expected pos() does make it look like a bug. On 18/02/16 5:33 pm, Scott Aron Bloom wrote: > > In the docs for QWidget::geometry() it says whats going on here.. > > http://doc.qt.io/qt-5/qwidget.html#geometry-prop > > “This property holds the geometry of the widget relative to its parent > and excluding the window frame.” > > It does NOT return a global position, if you want a global position, > you must convert to the global via > > http://doc.qt.io/qt-5/application-windows.html#window-geometry should > be read to learn what geometry represents. > > If you know the parent, you can use parent->mapToGlobal( QRect ) to > find the global rectangle. > > > Scott > > *From:*Interest > [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Wednesday, February 17, 2016 19:21 > *To:* Tony Rietwyk > *Cc:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > Hi Tony, > > sorry, let me clarify: > QT's co-oridnate system starts at the top left, right? > So when I scale the window by dragging the left side (or the top), the > point of origin changes and thus I expect a different global position > for the widget. > > The reason I am tying to determine the exact geometry of the parent > application is because I am trying to implement something like an > invisible slider, a mode where the use can click+drag anywhere in the > host application to change a certain value. Upon release the mode > disables itself until a hotkey is pressed again. > E.g. if the host application is a video player, I am trying to > implement a mode where the user can hit a hotkey, then click&drag > anywhere in the player to scrub through the video. > > I'm sure there are better ways to go about this (and I'd love to hear > advise on this), but at the moment, as a proof of concept, I am > creating a transparent widget that catches the mouse event and emits > the required signal, and I'd like for that widget to perfectly sit on > top of the parent app so if the user click/drags outside of it, it > won't have any effect. > > Ideally I'd just force the mouse event to my QObject rather than > create an transparent widget, but I don't know if this is possible? > > Does that make sense? > > Cheers, > frank > > On 18/02/16 3:59 pm, Tony Rietwyk wrote: > > Hi Frank, > > I don't understand what you are asking! Why do you expect that > changing the window size will change the position? You say > 'resulting in an offset for my widget' - sounds like you are > adding the new pos instead of just using it? > > Tracking foreign native windows is pretty rare. You need to > provide a cut-down version of what you are doing so others can > easily run it. > > Regards, > > Tony > > *From:*Interest > [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Thursday, 18 February 2016 8:14 AM > *To:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > anybody? > is this a bug? > > On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: > > Hi, > > I am trying to figure out my host application's window > geometry reliably and am struggling a bit. > > I use QApplication.activeWindow().geometry() to drive my > custom widget's geometry (I need to sit exactly on top of the > host application). > All works fine and my widget sits exactly on top of the host > application window, until the host app is scaled by dragging > one of it's sides out or in. After that > QApplication.activeWindow().geometry() still returns the same > exact position, though the size is correct, resulting in an > offset for my widget. > Turns out scaling windows on OSX by dragging their edges > doesn't seem to update QApplication.activeWindow().pos() > > As soon as I grab the title bar and move the host app a tiny > bit, QApplication.activeWindow().pos() seems to be updated > correctly. > > Is there a fix/workaround for this? > > Cheers, > frank > > -- > > ohufxLogo 50x50 > > > > *vfx compositing > | **workflow customisation and consulting > * > > > > > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > -- > > ohufxLogo 50x50 > > > > *vfx compositing | > **workflow customisation and consulting > * > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Thu Feb 18 05:45:15 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 18 Feb 2016 17:45:15 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <003f01d16a00$d5731b90$805952b0$@rightsoft.com.au> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> <003f01d16a00$d5731b90$805952b0$@rightsoft.com.au> Message-ID: <56C54C5B.9080602@ohufx.com> Thanks Tony, that sounds way more sensible than my approach. I will try this and report back. Cheers, frank On 18/02/16 4:59 pm, Tony Rietwyk wrote: > > Hi Frank - sorry for replying to you directly before! > > Have you looked at event filtering? A derived QObject can monitor, > and supress events going to another QObject - including windows. So: > > - when the hot key occurs, you installEventFilter on the current window, > > - if KeyPress Esc, then cancel, > > - if MousePress, then record start pos, > > - if MouseMove, then record the end pos > > - if MouseRelease, then record the end pos and finish > > When you finish or cancel, removeEventFilter. While active, you > always suppress the event to stop if going to the target window. > > Hope that helps, > > Tony > > *From:*Frank Rueter | OHUfx [mailto:frank at ohufx.com] > *Sent:* Thursday, 18 February 2016 2:21 PM > *To:* Tony Rietwyk > *Cc:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > Hi Tony, > > sorry, let me clarify: > QT's co-oridnate system starts at the top left, right? > So when I scale the window by dragging the left side (or the top), the > point of origin changes and thus I expect a different global position > for the widget. > > The reason I am tying to determine the exact geometry of the parent > application is because I am trying to implement something like an > invisible slider, a mode where the use can click+drag anywhere in the > host application to change a certain value. Upon release the mode > disables itself until a hotkey is pressed again. > E.g. if the host application is a video player, I am trying to > implement a mode where the user can hit a hotkey, then click&drag > anywhere in the player to scrub through the video. > > I'm sure there are better ways to go about this (and I'd love to hear > advise on this), but at the moment, as a proof of concept, I am > creating a transparent widget that catches the mouse event and emits > the required signal, and I'd like for that widget to perfectly sit on > top of the parent app so if the user click/drags outside of it, it > won't have any effect. > > Ideally I'd just force the mouse event to my QObject rather than > create an transparent widget, but I don't know if this is possible? > > Does that make sense? > > Cheers, > frank > > On 18/02/16 3:59 pm, Tony Rietwyk wrote: > > Hi Frank, > > I don't understand what you are asking! Why do you expect that > changing the window size will change the position? You say > 'resulting in an offset for my widget' - sounds like you are > adding the new pos instead of just using it? > > Tracking foreign native windows is pretty rare. You need to > provide a cut-down version of what you are doing so others can > easily run it. > > Regards, > > Tony > > *From:*Interest > [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Thursday, 18 February 2016 8:14 AM > *To:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > anybody? > is this a bug? > > On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: > > Hi, > > I am trying to figure out my host application's window > geometry reliably and am struggling a bit. > > I use QApplication.activeWindow().geometry() to drive my > custom widget's geometry (I need to sit exactly on top of the > host application). > All works fine and my widget sits exactly on top of the host > application window, until the host app is scaled by dragging > one of it's sides out or in. After that > QApplication.activeWindow().geometry() still returns the same > exact position, though the size is correct, resulting in an > offset for my widget. > Turns out scaling windows on OSX by dragging their edges > doesn't seem to update QApplication.activeWindow().pos() > > As soon as I grab the title bar and move the host app a tiny > bit, QApplication.activeWindow().pos() seems to be updated > correctly. > > Is there a fix/workaround for this? > > Cheers, > frank > > -- > > ohufxLogo 50x50 > > > > *vfx compositing > | **workflow customisation and consulting > * > > > > > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > -- > > ohufxLogo 50x50 > > > > *vfx compositing | > **workflow customisation and consulting > * > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From andre at familiesomers.nl Thu Feb 18 07:29:25 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Thu, 18 Feb 2016 07:29:25 +0100 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> Message-ID: <56C564C5.3040509@familiesomers.nl> Op 18/02/2016 om 05:33 schreef Scott Aron Bloom: > > If you know the parent, you can use parent->mapToGlobal( QRect ) to > find the global rectangle. > > You don't need to know the parent if you call mapToGlobal on the widget itself, using a rectangle with the right size at origin (0,0). André -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at ohufx.com Thu Feb 18 07:34:38 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 18 Feb 2016 19:34:38 +1300 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <003f01d16a00$d5731b90$805952b0$@rightsoft.com.au> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> <003f01d16a00$d5731b90$805952b0$@rightsoft.com.au> Message-ID: <56C565FE.2060101@ohufx.com> Thanks again, Tony, this works perfectly for me now. On 18/02/16 4:59 pm, Tony Rietwyk wrote: > > Hi Frank - sorry for replying to you directly before! > > Have you looked at event filtering? A derived QObject can monitor, > and supress events going to another QObject - including windows. So: > > - when the hot key occurs, you installEventFilter on the current window, > > - if KeyPress Esc, then cancel, > > - if MousePress, then record start pos, > > - if MouseMove, then record the end pos > > - if MouseRelease, then record the end pos and finish > > When you finish or cancel, removeEventFilter. While active, you > always suppress the event to stop if going to the target window. > > Hope that helps, > > Tony > > *From:*Frank Rueter | OHUfx [mailto:frank at ohufx.com] > *Sent:* Thursday, 18 February 2016 2:21 PM > *To:* Tony Rietwyk > *Cc:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > Hi Tony, > > sorry, let me clarify: > QT's co-oridnate system starts at the top left, right? > So when I scale the window by dragging the left side (or the top), the > point of origin changes and thus I expect a different global position > for the widget. > > The reason I am tying to determine the exact geometry of the parent > application is because I am trying to implement something like an > invisible slider, a mode where the use can click+drag anywhere in the > host application to change a certain value. Upon release the mode > disables itself until a hotkey is pressed again. > E.g. if the host application is a video player, I am trying to > implement a mode where the user can hit a hotkey, then click&drag > anywhere in the player to scrub through the video. > > I'm sure there are better ways to go about this (and I'd love to hear > advise on this), but at the moment, as a proof of concept, I am > creating a transparent widget that catches the mouse event and emits > the required signal, and I'd like for that widget to perfectly sit on > top of the parent app so if the user click/drags outside of it, it > won't have any effect. > > Ideally I'd just force the mouse event to my QObject rather than > create an transparent widget, but I don't know if this is possible? > > Does that make sense? > > Cheers, > frank > > On 18/02/16 3:59 pm, Tony Rietwyk wrote: > > Hi Frank, > > I don't understand what you are asking! Why do you expect that > changing the window size will change the position? You say > 'resulting in an offset for my widget' - sounds like you are > adding the new pos instead of just using it? > > Tracking foreign native windows is pretty rare. You need to > provide a cut-down version of what you are doing so others can > easily run it. > > Regards, > > Tony > > *From:*Interest > [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Thursday, 18 February 2016 8:14 AM > *To:* interest at qt-project.org > *Subject:* Re: [Interest] QApplication.activeWindow().pos() not > returning correct value after sacling on OSX > > anybody? > is this a bug? > > On 16/02/16 12:21 pm, Frank Rueter | OHUfx wrote: > > Hi, > > I am trying to figure out my host application's window > geometry reliably and am struggling a bit. > > I use QApplication.activeWindow().geometry() to drive my > custom widget's geometry (I need to sit exactly on top of the > host application). > All works fine and my widget sits exactly on top of the host > application window, until the host app is scaled by dragging > one of it's sides out or in. After that > QApplication.activeWindow().geometry() still returns the same > exact position, though the size is correct, resulting in an > offset for my widget. > Turns out scaling windows on OSX by dragging their edges > doesn't seem to update QApplication.activeWindow().pos() > > As soon as I grab the title bar and move the host app a tiny > bit, QApplication.activeWindow().pos() seems to be updated > correctly. > > Is there a fix/workaround for this? > > Cheers, > frank > > -- > > ohufxLogo 50x50 > > > > *vfx compositing > | **workflow customisation and consulting > * > > > > > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > -- > > ohufxLogo 50x50 > > > > *vfx compositing | > **workflow customisation and consulting > * > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From scott at towel42.com Thu Feb 18 07:35:54 2016 From: scott at towel42.com (Scott Aron Bloom) Date: Thu, 18 Feb 2016 06:35:54 +0000 Subject: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX In-Reply-To: <56C564C5.3040509@familiesomers.nl> References: <56C25D5E.1090701@ohufx.com> <56C4E2A0.9050304@ohufx.com> <001e01d169f8$5c2b9120$1482b360$@rightsoft.com.au> <56C53885.7080802@ohufx.com> <56C564C5.3040509@familiesomers.nl> Message-ID: Ahh yes.. Good point.. 99% of my mapTo usage is with event handler and menus... but Andre is 100% correct From: Interest [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of André Somers Sent: Wednesday, February 17, 2016 22:29 To: interest at qt-project.org Subject: Re: [Interest] QApplication.activeWindow().pos() not returning correct value after sacling on OSX Op 18/02/2016 om 05:33 schreef Scott Aron Bloom: If you know the parent, you can use parent->mapToGlobal( QRect ) to find the global rectangle. You don't need to know the parent if you call mapToGlobal on the widget itself, using a rectangle with the right size at origin (0,0). André -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at rightsoft.com.au Thu Feb 18 08:59:09 2016 From: tony at rightsoft.com.au (Tony Rietwyk) Date: Thu, 18 Feb 2016 18:59:09 +1100 Subject: [Interest] How to use QStyle::sizeFromContents on a QFrame - missing CT_Frame? Message-ID: <008501d16a22$3fc4a7e0$bf4df7a0$@rightsoft.com.au> Hi Everybody, I have a QFrame derived widget that is styled by a global stylesheet that sets padding, border width, etc. When I know the size of the contents, what do I pass as ContentsType to get the adjusted size to use as minimumSizeHint? Using style()->sizeFromContents( CT_ToolButton, nullptr, contentsSize, this ) almost works, but it returns values that are several pixels too big. Regards, Tony From bma at ro.ru Thu Feb 18 11:32:12 2016 From: bma at ro.ru (=?koi8-r?B?7cHL08nNIOLF097F0sXXztnI?=) Date: Thu, 18 Feb 2016 13:32:12 +0300 Subject: [Interest] C++/QML Sequence Type to JavaScript Array Message-ID: <1455791532.572281.32401.30681@mail.rambler.ru> In docs http://doc.qt.io/qt-5/qtqml-cppintegration-data.html mentioned: "Certain C++ sequence types are supported transparently in QML as JavaScript Array types. In particular, QML currently supports: QList QList QList QList and QStringList QList Other sequence types are not supported transparently, and instead an instance of any other sequence type will be passed between QML and C++ as an opaque QVariantList." Looks like that "opaque conversion" doesn't work: class MyData : public QObject { Q_OBJECT Q_PROPERTY(QList path READ path WRITE setPath NOTIFY pathChanged) public: QList path() { return _path; } ... MyData object filled with some data and exposed as context property to QML. At QML i imported QtPositioning, so QGeoCoordinate refers to coordinate QML basic type, but console.log(myData.path) prints QVariant(QList) console.log(myData.path) prints undefined - there is no sequence, no length. Is it possible to expose QList sequence to QML, where Type known by meta object system and refers to QML basic type provided by an QtQuick module? I know that i can expose C++ property of type QVariantList , but what is that opaque conversion mentioned in docs. Maxim Максим Бесчеревных. From shiva.s at rsageventures.com Thu Feb 18 13:28:50 2016 From: shiva.s at rsageventures.com (Shiva sitamraju) Date: Thu, 18 Feb 2016 17:58:50 +0530 Subject: [Interest] QDekstopWidget for an X display Message-ID: Hi, I have an Xdisplay say :2 . I want to do display my qt widget on given X display. It should work similar to doing export DISPLAY=:2 and then run a application I know QDekstopWidget has screen function(). This is not what I want. I have a special case when I want to directly access X Display using the display id. Let me know if there is anyway to do this . Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From tero.kojo at theqtcompany.com Thu Feb 18 14:07:33 2016 From: tero.kojo at theqtcompany.com (Kojo Tero) Date: Thu, 18 Feb 2016 13:07:33 +0000 Subject: [Interest] QtCon in Berlin 1st-4th September 2016 Message-ID: Hello Qt Contributors, Please mark your calendars for QtCon in Berlin 1st - 4th September. The venue will be the bcc in the center of Berlin. QtCon is not just this year's major Free and Open Source event in Europe for participants with an interest in Qt, but also a unique forum for talks and knowledge sharing in a state-of-the-art environment. We are bringing together our annual events KDE Akademy, VideoLAN Developer Days, Qt Contributors' Summit, FSFE Summit and KDAB Qt training day under one roof. https://qtcon.org/ The call for talks and workshops will be posted later in the spring, as will be the registration guidelines. Best regards, Tero Kojo -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhihn at gmx.com Thu Feb 18 17:25:21 2016 From: jhihn at gmx.com (Jason H) Date: Thu, 18 Feb 2016 17:25:21 +0100 Subject: [Interest] C++/QML Sequence Type to JavaScript Array In-Reply-To: <1455791532.572281.32401.30681@mail.rambler.ru> References: <1455791532.572281.32401.30681@mail.rambler.ru> Message-ID: > MyData object filled with some data and exposed as context property to QML. At QML i imported QtPositioning, so QGeoCoordinate refers to coordinate QML basic type, but > console.log(myData.path) prints QVariant(QList) > console.log(myData.path) prints undefined > - there is no sequence, no length. > > Is it possible to expose QList sequence to QML, where Type known by meta object system and refers to QML basic type provided by an QtQuick module? > I know that i can expose C++ property of type QVariantList , but what is that opaque conversion mentioned in docs. I think you want to convert them to a QList ? I do that and it works. I don't know that I'm using the builr-in opaque conversion, but maybe that is just a matter of having a QVariantMap conversion? From maxim.bescherevnykh at gmail.com Thu Feb 18 21:02:15 2016 From: maxim.bescherevnykh at gmail.com (Maxim Bescherevnykh) Date: Thu, 18 Feb 2016 23:02:15 +0300 Subject: [Interest] Qt 5.6 high DPI scaling & resources Message-ID: In Qt Quick Controls 1 i can use an ldpi/mdpi/hdpi/etc. icon image depending on target screen DPI and icons looks perfect with proper size. Qt Quick Controls 2 designed to be used with Qt::AA_EnableHighDpiScaling at least on X11, Windows, Android, Eglfs. But i don't realise whats the right way to deal with icon resources in Qt Quick Controls 2 app. Also looks like scaling works weird with QtQuick Map (need to test that). -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhihn at gmx.com Thu Feb 18 21:53:42 2016 From: jhihn at gmx.com (Jason H) Date: Thu, 18 Feb 2016 21:53:42 +0100 Subject: [Interest] Minimum work needed to update bundle for Apple App Store? Message-ID: Recently, Apple started requiring a 167x167px icon for iPad Pro. I added the entry to the Info.plist, but was unsure of what to do. Will the icon be included in the bundle just from from the plist change? Will I have to rebuild the app? Will it only update when the .xcodeproj is rebuilt, and if so, how do I regenerate that? It took me a few tries to get it included, that's why I'm asking. Thanks. From ekke at ekkes-corner.org Thu Feb 18 21:56:36 2016 From: ekke at ekkes-corner.org (ekke) Date: Thu, 18 Feb 2016 21:56:36 +0100 Subject: [Interest] Qt 5.6 high DPI scaling & resources In-Reply-To: References: Message-ID: <56C63004.1030502@ekkes-corner.org> Am 18.02.16 um 21:02 schrieb Maxim Bescherevnykh: > In Qt Quick Controls 1 i can use an ldpi/mdpi/hdpi/etc. icon image > depending on target screen DPI and icons looks perfect with proper size. > Qt Quick Controls 2 designed to be used with Qt::AA_EnableHighDpiScaling > at least on X11, Windows, Android, Eglfs. But i don't realise whats > the right way to deal with icon resources in Qt Quick Controls 2 app. icons depend on DevicePixelRatio and are named this way myIcon.png - corresponds to 1.0 and mdpi myIcon at 2x.png - 2.0 and xhdpi myIcon at 3x.png - 3.0 and xxhdpi myIcon at 4x.png - 4.0 and xxxhdpi > > Also looks like scaling works weird with QtQuick Map (need to test that). not tested yet - I'm just starting with Qt ekke > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.shienkov at gmail.com Fri Feb 19 10:48:46 2016 From: denis.shienkov at gmail.com (Denis Shienkov) Date: Fri, 19 Feb 2016 12:48:46 +0300 Subject: [Interest] Make friends the QtMultimedia and Tegra Jetson TK1 Message-ID: Hi, folks, I have looked this blog [1] in which it is told about surprises of Tegra Jetson TK1. But, seems, I have a new surprise, when the QMediaPlayer shows four identical videos on the HDMI display, instead of one video. This happens as in QML (MediaPlayer/Video items), and as in C++ (QMediaPlayer), using the LinuxFB/EGLFS backends (I have only two these backends) [2]. I have use gstreamer1.0. I have use a full-screen mode (as for QML, and as for C++), like: {code} ... widget.showFullScreen(); ... {code} I have cross-compiled Qt5 (as 5.5.1, and as 5.6.0) with this configuration: {code} #!/bin/sh /home/builder/Projects/qt5/./configure \ -v \ -release \ -opensource \ -confirm-license \ -make libs \ -prefix /opt/qt-5.6.0 \ -device tegra-tk1 \ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \ -sysroot /home/builder/Projects/tegra/rootfs \ -optimized-qmake \ -gstreamer 1.0 \ -nomake examples \ -nomake tests \ -no-compile-examples \ -no-gtkstyle \ -no-qml-debug \ -no-nis \ -no-tslib \ -no-harfbuzz \ -no-openssl \ -no-libproxy \ -no-pulseaudio \ -cups \ -no-icu \ -no-fontconfig \ -no-sql-db2 \ -plugin-sql-mysql \ -no-sql-oci \ -no-sql-odbc \ -no-sql-psql \ -plugin-sql-sqlite \ -no-sql-sqlite2 \ -no-sql-ibase \ -no-sql-tds \ -no-directfb \ -no-kms \ -no-xcb \ -no-xcb-xlib \ -no-glib \ -qt-freetype \ -system-zlib \ -system-libjpeg \ -system-libpng \ -opengl es2 \ -skip qt3d \ -skip qtactiveqt \ -skip qtandroidextras \ -skip qtcanvas3d \ -skip qtconnectivity \ -skip qtdoc \ -skip qtdocgallery \ -skip qtenginio \ -skip qtfeedback \ -skip qtimageformats \ -skip qtlocation \ -skip qtmacextras \ -skip qtpim \ -skip qtqa \ -skip qtquick1 \ -skip qtquickcontrols \ -skip qtrepotools \ -skip qtsensors \ -skip qtserialport \ -skip qtsystems \ -skip qttools \ -skip qttranslations \ -skip qtwayland \ -skip qtwebchannel \ -skip qtwebengine \ -skip qtwebkit \ -skip qtwebkit-examples \ -skip qtwebsockets \ -skip qtwinextras \ {code} The native "gst-launch" utility works fine (as expected) when I want to playback of a my *.mp4 video: {code} $ gst-launch-1.0 filesrc location= ! qtdemux name=demux ! h264parse ! omxh264dec ! nvhdmioverlaysink –e {code} So, I need help to make friendly the QMediaPlayer & Tegra Jetson board. is there are any things about? why whis happens? maybe you can point me to the direction where I need to look in sources of QtMultimedia's gstreamer backend? BR, Denis --------- [1] - http://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/ [2] - https://bugreports.qt.io/browse/QTBUG-51234 -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.mironchik at gmail.com Fri Feb 19 10:50:18 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Fri, 19 Feb 2016 12:50:18 +0300 Subject: [Interest] QTextDocument, QPdfWriter, QSvgRender Message-ID: <56C6E55A.5060703@gmail.com> Hi, I want to print QTextDocument to PDF, it's simple. My question: is it possible to say to QTextDocument to draw images as vector graphics if they are SVG images? Thanks. From dmytro.haponov at gmail.com Fri Feb 19 13:16:13 2016 From: dmytro.haponov at gmail.com (Dmytro Haponov) Date: Fri, 19 Feb 2016 14:16:13 +0200 Subject: [Interest] lowEnergyScanner detects ibeacons that are absent Message-ID: after creating this topic https://forum.qt.io/topic/64355/lowenergyscanner-example-shows-absent-devices/2 I was advised to address the question here. The general question is - how to actively scan for BLE devices that are present at the moment of scan? Dmytro Haponov -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexander.blasche at theqtcompany.com Fri Feb 19 13:57:59 2016 From: alexander.blasche at theqtcompany.com (Blasche Alexander) Date: Fri, 19 Feb 2016 12:57:59 +0000 Subject: [Interest] lowEnergyScanner detects ibeacons that are absent In-Reply-To: References: Message-ID: The delay between the device disappearing and the scan results being adjust is caused by caching in the Bluetooth stack. On Bluez the default is 2 or 3 mins for cache expiry. I have no data about other platforms. What platform are you on? In fact in some cases the caching goes even further. Sometimes the details of the disappeared device are cached and when you connect you get data from the cache or the list of the services. This doesn't work on Bluez but I have seen this behavior on WinRT for example. Unfortunately, there is not much you can do about it. -- Alex ________________________________ From: Interest on behalf of Dmytro Haponov Sent: Friday, February 19, 2016 13:16 To: interest at qt-project.org Subject: [Interest] lowEnergyScanner detects ibeacons that are absent after creating this topic https://forum.qt.io/topic/64355/lowenergyscanner-example-shows-absent-devices/2 I was advised to address the question here. The general question is - how to actively scan for BLE devices that are present at the moment of scan? Dmytro Haponov -------------- next part -------------- An HTML attachment was scrubbed... URL: From jagernicolas at legtux.org Fri Feb 19 15:32:45 2016 From: jagernicolas at legtux.org (jagernicolas at legtux.org) Date: Fri, 19 Feb 2016 09:32:45 -0500 Subject: [Interest] blocking domains/websites Message-ID: <1adfa64c268a8c3c2f5f36048518dcf4@legtux.org> Hi I'm using QtWebEngine, there is a way with Qt to block anything coming from some domain/website ? regards, Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kai.Koehne at theqtcompany.com Fri Feb 19 15:43:53 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Fri, 19 Feb 2016 14:43:53 +0000 Subject: [Interest] blocking domains/websites In-Reply-To: <1adfa64c268a8c3c2f5f36048518dcf4@legtux.org> References: <1adfa64c268a8c3c2f5f36048518dcf4@legtux.org> Message-ID: > -----Original Message----- > Subject: [Interest] blocking domains/websites > > Hi > > I'm using QtWebEngine, there is a way with Qt to block anything coming > from some domain/website ? With 5.6 you'll be able to intercept requests (QWebEngineUrlRequestInterceptor). See e.g. https://codereview.qt-project.org/#/c/146140/1/examples/webengine/singlepage/main.cpp Regards Kai From ekke at ekkes-corner.org Fri Feb 19 17:04:49 2016 From: ekke at ekkes-corner.org (ekke) Date: Fri, 19 Feb 2016 17:04:49 +0100 Subject: [Interest] Qt Creator - questions HowTo copy/past src/res Message-ID: <56C73D21.7040809@ekkes-corner.org> Got no answers in the forums, so I'm trying it here. while preparing a blog series for BlackBerry 10 (and other) devs HowTo use Qt Creator for Qt 5.6 vs Eclipse Momentics (Cascades, Qt 4.8) I'm having some questions. Hope I understood it right how QtCreator is doing "things" ;-) 1. copy / paste resources Having two projects open and want to copy some icons from project A to project B In Momentics I would mark some files from project A tree, then copy and in project B tree paste them. This seems not to work with Qt Creator. Is this the right way: go to the file system copy files from A to B (per ex. copy images/arrow.png, images/arrow at 2x.png,...) if not exist create the images subfolder then back to Qt Creator select qml.qrc, add existing files, select the images and then they appear in qml.qrc and are under control of Qt Creator am I right that there's no automatical sync with file system ? so renaming, delete, add must be done from inside Qt Creator ? 2. qml.qrc and QML looked at some samples and also created new Qt Quick applications and noticed: the main.qml was automatically generated from new project wizard and ONLY inside the qml.qrc file some other examples - per ex. gallery from Qt 5.6 qt.labs.controls: the gallery.qml was visible inside the gallery.qrc but below the Resources folder there's also a folder named 'QML' containing the same gallery.qml how will this be done to show the same qml file inside .qrc and also inside QML folder ? or is it ok if all qml files are only insie .qrc ? what's the recommended way ? 3. copy/paste src code if I want to copy/paste .cpp, .h source files from another project, I have to do it the same way as with resources described at 1. above ? 4. code generated from outside into the project I'm working on a DSL to generate code from a model into a project (already done for Momentics/Cascades, now working to make this generator x-platform for Qt 5.6 mobile - will be open source) I'm generating the code into a subfolder /src-gen would it be ok to also generate a .pri with HEADERS and SOURCES of generated files and include this into my .pro ? thanks for helping don't want to provide wrong recipes in articles for blog and print media -- ekke (ekkehard gentz) independent software architect international development native mobile business apps BlackBerry 10 | Qt Mobile (Android, iOS) workshops - trainings - bootcamps *BlackBerry Elite Developer BlackBerry Platinum Enterprise Partner* max-josefs-platz 30, D-83022 rosenheim, germany mailto:ekke at ekkes-corner.org blog: http://ekkes-corner.org apps and more: http://appbus.org twitter: @ekkescorner skype: ekkes-corner LinkedIn: http://linkedin.com/in/ekkehard/ Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpnurmi at theqtcompany.com Fri Feb 19 17:50:33 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Fri, 19 Feb 2016 16:50:33 +0000 Subject: [Interest] Qt Creator - questions HowTo copy/past src/res In-Reply-To: <56C73D21.7040809@ekkes-corner.org> References: <56C73D21.7040809@ekkes-corner.org> Message-ID: <44E8DA58-7CC2-42E6-9C67-CC809856CCE8@theqtcompany.com> Hi, > On 19 Feb 2016, at 17:05, ekke wrote: > > 2. qml.qrc and QML > looked at some samples and also created new Qt Quick applications and noticed: > the main.qml was automatically generated from new project wizard and ONLY inside the qml.qrc file > some other examples - per ex. gallery from Qt 5.6 qt.labs.controls: > the gallery.qml was visible inside the gallery.qrc > but below the Resources folder there's also a folder named 'QML' containing the same gallery.qml > how will this be done to show the same qml file inside .qrc and also inside QML folder ? > or is it ok if all qml files are only insie .qrc ? > what's the recommended way ? Personally, I like the flat QML tree much more than the hierarchical resources tree, so I tend to list .qml files in the OTHER_FILES variable in the .pro file. This is also done in the Gallery example. -- J-P Nurmi From jpnurmi at theqtcompany.com Fri Feb 19 18:14:24 2016 From: jpnurmi at theqtcompany.com (Nurmi J-P) Date: Fri, 19 Feb 2016 17:14:24 +0000 Subject: [Interest] Qt Creator - questions HowTo copy/past src/res In-Reply-To: <56C74BCC.4060900@ekkes-corner.org> References: <56C73D21.7040809@ekkes-corner.org> <44E8DA58-7CC2-42E6-9C67-CC809856CCE8@theqtcompany.com>, <56C74BCC.4060900@ekkes-corner.org> Message-ID: <78A66372-8014-43C3-826B-1E20492DB196@theqtcompany.com> On 19 Feb 2016, at 18:07, ekke > wrote: Hi, thanks for answer. Am 19.02.16 um 17:50 schrieb Nurmi J-P: Hi, On 19 Feb 2016, at 17:05, ekke wrote: 2. qml.qrc and QML looked at some samples and also created new Qt Quick applications and noticed: the main.qml was automatically generated from new project wizard and ONLY inside the qml.qrc file some other examples - per ex. gallery from Qt 5.6 qt.labs.controls: the gallery.qml was visible inside the gallery.qrc but below the Resources folder there's also a folder named 'QML' containing the same gallery.qml how will this be done to show the same qml file inside .qrc and also inside QML folder ? or is it ok if all qml files are only insie .qrc ? what's the recommended way ? Personally, I like the flat QML tree much more than the hierarchical resources tree, so I tend to list .qml files in the OTHER_FILES variable in the .pro file. This is also done in the Gallery example. that's where I have seen it But why is only the gallery.qml listed under OTHER_FILES and not all the qml files ? This is the down-side of maintaining two lists. Somebody forgot to add the pages. In the first draft of the gallery there weren't others than gallery.qml... :) I'm also wondering why the qrc hierarchy wasn't displayed as a tree ;-) What do you mean? When I expand the QML files I can see the list right away. With resources, you have to expand the resource file and then the prefix to eventually get to the list. The reason is simply that there can be multiple .qrc files and each can contain multiple prefixes. -- J-P Nurmi -------------- next part -------------- An HTML attachment was scrubbed... URL: From suy at badopi.org Fri Feb 19 18:33:38 2016 From: suy at badopi.org (Alejandro Exojo) Date: Fri, 19 Feb 2016 18:33:38 +0100 Subject: [Interest] Minimum work needed to update bundle for Apple App Store? In-Reply-To: References: Message-ID: <201602191833.38459.suy@badopi.org> El Thursday 18 February 2016, Jason H escribió: > Recently, Apple started requiring a 167x167px icon for iPad Pro. > I added the entry to the Info.plist, but was unsure of what to do. > Will the icon be included in the bundle just from from the plist change? > Will I have to rebuild the app? > Will it only update when the .xcodeproj is rebuilt, and if so, how do I > regenerate that? > > It took me a few tries to get it included, that's why I'm asking. I haven't deployed to the app store, nor I attempted to use the iOS support (or generate a xcodeproj through qmake), but in general, if you want stuff put into the app bundle, you just need to tell it so to qmake. Just use something like this: myicon.path = Contents/Resources myicon.files = assets/myicon.icns QMAKE_BUNDLE_DATA += myicon The xcodeproj is generated from the qmake project file (at least, it can be done this way, so I assume is what you are doing). -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net From jagernicolas at legtux.org Sat Feb 20 04:47:34 2016 From: jagernicolas at legtux.org (Nicolas =?UTF-8?B?SsOkZ2Vy?=) Date: Fri, 19 Feb 2016 22:47:34 -0500 Subject: [Interest] blocking domains/websites In-Reply-To: References: <1adfa64c268a8c3c2f5f36048518dcf4@legtux.org> Message-ID: <20160219224734.46af4850@motorhead> Hi kai, thx! so I'll wait a little... March the 3 + the time needed to get Qt5.6 in Arch repos... regards, Nicolas From igor.mironchik at gmail.com Sat Feb 20 08:01:38 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Sat, 20 Feb 2016 10:01:38 +0300 Subject: [Interest] QTextDocument | QPdfWriter | Internal Links Message-ID: <56C80F52.1060904@gmail.com> Hi, I'm trying to understand how to work with internal links in PDF. Here is the simple code: #include #include #include #include #include int main( int argc, char ** argv ) { QApplication app( argc, argv ); QPdfWriter pdf( "/home/igor/test.pdf" ); QTextDocument doc; QTextCharFormat fmt; fmt.setAnchorName( "title" ); fmt.setAnchor( true ); QTextCursor c( &doc ); c.insertText( "Title\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", fmt ); QTextCharFormat link; link.setAnchorHref( "title" ); link.setAnchor( true ); c.insertText( "Go to title", link ); doc.print( &pdf ); return 0; } But when I click on "Go to title" in PDF, viewer tries to open file "title" instead of navigating through the PDF. How to correctly set anchors and links in QTextDocument? From igor.mironchik at gmail.com Sat Feb 20 09:23:04 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Sat, 20 Feb 2016 11:23:04 +0300 Subject: [Interest] QTextDocument, QPdfWriter, QSvgRender In-Reply-To: <56C6E55A.5060703@gmail.com> References: <56C6E55A.5060703@gmail.com> Message-ID: <56C82268.1060306@gmail.com> The answer to my own question... voidprintDocument(constQTextDocument&doc,QPdfWriter&pdf,constQRectF&body ){QTextBlockblock =doc.begin();QPainterp;p.begin(&pdf );qreal y =0.0;while(block.isValid()){QTextBlock::Iteratorit =block.begin();QTextImageFormatimageFormat;boolisObject =false;boolisImage =false;boolisBreak =false;for(;!it.atEnd();++it ){constQStringtxt =it.fragment().text();isObject =txt.contains(QChar::ObjectReplacementCharacter);isImage =isObject &&it.fragment().charFormat().isImageFormat();isBreak =isObject &&(it.fragment().charFormat().objectType()==c_pageBreakType );if(isImage )imageFormat =it.fragment().charFormat().toImageFormat();}if(isBreak ){pdf.newPage();y =0.0;}elseif(isImage ){QSvgRenderersvg(imageFormat.name());QSizes =svg.viewBox().size();if(s.width()>body.size().width()||s.height()>body.size().height())s.scale(QSize(body.size().width(),body.size().height()),Qt::KeepAspectRatio);if((y +s.height())>body.height()){pdf.newPage();y =0.0;}p.save();p.translate((body.size().width()-s.width())/2,y );svg.render(&p,QRectF(0,0,s.width(),s.height()));y +=s.height();p.restore();}else{constQRectFr =block.layout()->boundingRect();block.layout()->setPosition(QPointF(0.0,0.0));if((y +r.height())>body.height()){pdf.newPage();y =0.0;}block.layout()->draw(&p,QPointF(0.0,y ));y +=r.height();}block =block.next();}p.end();} On 19.02.2016 12:50, Igor Mironchik wrote: > Hi, > > I want to print QTextDocument to PDF, it's simple. My question: is it > possible to say to QTextDocument to draw images as vector graphics if > they are SVG images? > > Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chgans at gna.org Sat Feb 20 12:39:52 2016 From: chgans at gna.org (Ch'Gans) Date: Sun, 21 Feb 2016 00:39:52 +1300 Subject: [Interest] QGraphicsView and ViewPortMargin question Message-ID: Hi There, I have sub-classed a QGraphicsView to add some custom rulers on the top and on the left. For this I've followed the principle used here [1], basically what's done there is: - set a QGridLayout to the QGV - Add an horizontal ruler at top and left - set QGV's viewPort as the "central widget" - set QGV's ViewPortMargin (23 pixels, which is the space needed by my rulers My implementation of the rulers is actually different, it only needs to know the scene coordinates of the displayed area, and the scene position of the mouse cursor to decide where to draw the major/minor ticks and the cursor indicator. Visually it does the job pretty well, but now I'm having problem with map{To/Form}{Scene/Global}. It seems that QGV mapping function doesn't take into account this new viewport margins. Doeas anyone have any tip on how to get the information needed by my 2 rulers? I have an auxiliary question as well, how to get the scene rect displayed by the QVG which would take into account the space "eaten" by the scroll bars? QGV::geometry() doesn't seems to return the exposed area, not does QGV::viewPort::geometry(). Any help appreciated, in any form (docs, blog, implementation example, ...) Chris [1] https://kernelcoder.wordpress.com/2010/08/25/how-to-insert-ruler-scale-type-widget-into-a-qabstractscrollarea-type-widget/ From dmytro.haponov at gmail.com Sat Feb 20 15:39:28 2016 From: dmytro.haponov at gmail.com (Dmytro Haponov) Date: Sat, 20 Feb 2016 16:39:28 +0200 Subject: [Interest] Interest Digest, Vol 53, Issue 19 Message-ID: what is the right way to communicate up here? about BLEscanner: Blasche Alexander, I'm on Ubuntu 15.10 x86 - and it's 7-8 mins for this cache to renew. Is that the same cache that QBluetoothDeviceInfo has method bool isCached() ? - 'cos it returns false to me about any ibeacons all the time - whether they're in range or not. What's even worse - I can't get the real picture of what ibeacons are in range for the moment even in case of constantly deleting and creating new deviceDiscoveryAgents! When the new one is created its discoveredDeviced list is empty, but as soon as I start() the agent - its list of discovered devices is not empty!! It simply returns rssi == 0 for the devices it had already seen and there's no way to know - whether that ibeacon is now in range or not... I believe bluez has nothing to do with it as I can always get the right info with "sudo hcitool lesan" On Sat, Feb 20, 2016 at 1:40 PM, wrote: > > ---------- Forwarded message ---------- > From: Dmytro Haponov > To: interest at qt-project.org > Cc: > Date: Fri, 19 Feb 2016 14:16:13 +0200 > Subject: [Interest] lowEnergyScanner detects ibeacons that are absent > after creating this topic > > https://forum.qt.io/topic/64355/lowenergyscanner-example-shows-absent-devices/2 > I was advised to address the question here. > > The general question is - how to actively scan for BLE devices that are > present at the moment of scan? > > Dmytro Haponov > > > ---------- Forwarded message ---------- > From: Blasche Alexander > To: "interest at qt-project.org" > Cc: > Date: Fri, 19 Feb 2016 12:57:59 +0000 > Subject: Re: [Interest] lowEnergyScanner detects ibeacons that are absent > > The delay between the device disappearing and the scan results being > adjust is caused by caching in the Bluetooth stack. On Bluez the default is > 2 or 3 mins for cache expiry. I have no data about other platforms. What > platform are you on? > > > In fact in some cases the caching goes even further. Sometimes the details > of the disappeared device are cached and when you connect you get data from > the cache or the list of the services. This doesn't work on Bluez but I > have seen this behavior on WinRT for example. > > > Unfortunately, there is not much you can do about it. > > -- > > Alex > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From norulez at me.com Sun Feb 21 04:14:00 2016 From: norulez at me.com (NoRulez) Date: Sun, 21 Feb 2016 04:14:00 +0100 Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with QWebEngine Message-ID: Hello, first, I know that I can't use QNetworkCookieJar with QWebEngine, but what are the new alternatives to set the CookieJar and Proxy settings with QWebEngine? Users which saved cookies with CookieJar (ini file) from QWebKit, how can these load an save those with QWebEngine? It was possible with Qt5.5 but now with Qt5.6 beta it isn't! Best Regards From igor.mironchik at gmail.com Sun Feb 21 21:22:29 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Sun, 21 Feb 2016 23:22:29 +0300 Subject: [Interest] QTextDocument | QPdfWriter | Internal Links In-Reply-To: <56C80F52.1060904@gmail.com> References: <56C80F52.1060904@gmail.com> Message-ID: <56CA1C85.7000008@gmail.com> Again the answer to my own question: seems that currently QTextDocument supports external links only. Even if set HTML with and doesn't work... It's good suggestion to Qt's guys to implement internals links in QTextDocument. On 20.02.2016 10:01, Igor Mironchik wrote: > Hi, > > I'm trying to understand how to work with internal links in PDF. > > Here is the simple code: > > #include > #include > #include > #include > #include > > > int main( int argc, char ** argv ) > { > QApplication app( argc, argv ); > > QPdfWriter pdf( "/home/igor/test.pdf" ); > > QTextDocument doc; > > QTextCharFormat fmt; > fmt.setAnchorName( "title" ); > fmt.setAnchor( true ); > > QTextCursor c( &doc ); > c.insertText( > "Title\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" > "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", fmt ); > > QTextCharFormat link; > link.setAnchorHref( "title" ); > link.setAnchor( true ); > > c.insertText( "Go to title", link ); > > doc.print( &pdf ); > > return 0; > } > > But when I click on "Go to title" in PDF, viewer tries to open file > "title" instead of navigating through the PDF. > > How to correctly set anchors and links in QTextDocument? From dangelog at gmail.com Sun Feb 21 22:05:20 2016 From: dangelog at gmail.com (Giuseppe D'Angelo) Date: Sun, 21 Feb 2016 22:05:20 +0100 Subject: [Interest] QTextDocument | QPdfWriter | Internal Links In-Reply-To: <56CA1C85.7000008@gmail.com> References: <56C80F52.1060904@gmail.com> <56CA1C85.7000008@gmail.com> Message-ID: On Sun, Feb 21, 2016 at 9:22 PM, Igor Mironchik wrote: > It's good suggestion to Qt's guys to implement internals links in > QTextDocument. Feel free to open a feature request on the bugracker, or even better, implement the feature yourself :) -- Giuseppe D'Angelo From chgans at gna.org Mon Feb 22 00:02:56 2016 From: chgans at gna.org (Ch'Gans) Date: Mon, 22 Feb 2016 12:02:56 +1300 Subject: [Interest] QGraphicsView and ViewPortMargin question In-Reply-To: References: Message-ID: On 21 February 2016 at 00:39, Ch'Gans wrote: > Hi There, > > I have sub-classed a QGraphicsView to add some custom rulers on the > top and on the left. > For this I've followed the principle used here [1], basically what's > done there is: > - set a QGridLayout to the QGV > - Add an horizontal ruler at top and left > - set QGV's viewPort as the "central widget" > - set QGV's ViewPortMargin (23 pixels, which is the space needed by my rulers Actually, everything works as expected if I use something like: void MyView::updateRulerCursorRanges() { QPointF topLeft = mapToScene(QPoint(0, 0)); QPointF bottomRight = mapToScene(QPoint(viewport()->width(), viewport()->height())); m_horizontalRuler->setCursorRange(topLeft.x(), bottomRight.x()); m_verticalRuler->setCursorRange(topLeft.y(), bottomRight.y()); } void MyView::updateRulerCursorPositions() { QPointF pos = mapToScene(viewport()->mapFromGlobal(QCursor::pos())); m_horizontalRuler->setCursorPosition(pos); m_verticalRuler->setCursorPosition(pos); } Chris > > Chris > > [1] https://kernelcoder.wordpress.com/2010/08/25/how-to-insert-ruler-scale-type-widget-into-a-qabstractscrollarea-type-widget/ From igor.mironchik at gmail.com Mon Feb 22 05:56:02 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 07:56:02 +0300 Subject: [Interest] Best practice to packages on Ubuntu with QtIF Message-ID: <56CA94E2.8010907@gmail.com> Hi, What is the best practices to create packages on Ubuntu with QtIF? I'm interested in one stuff: if my application consists of executable and shared libraries, so to application start I have to "export LD_LIBRARY_PATH=." in working directory. So my question is it possible to set LD_LIBRARY_PATH automatically? How can it be done? Thank you. From Kai.Koehne at theqtcompany.com Mon Feb 22 07:22:03 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 22 Feb 2016 06:22:03 +0000 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: <56CA94E2.8010907@gmail.com> References: <56CA94E2.8010907@gmail.com> Message-ID: > -----Original Message----- > From: Interest [mailto:interest- > bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of Igor > Mironchik > Sent: Monday, February 22, 2016 5:56 AM > To: interest at qt-project.org > Subject: [Interest] Best practice to packages on Ubuntu with QtIF > > Hi, > > What is the best practices to create packages on Ubuntu with QtIF? > > I'm interested in one stuff: if my application consists of executable and > shared libraries, so to application start I have to "export > LD_LIBRARY_PATH=." in working directory. So my question is it possible to > set LD_LIBRARY_PATH automatically? How can it be done? Technically, you could provide a wrapper (myapp.sh). But you shouldn't do that. You should rather utilize rpath, and set it e.g. to $ORIGIN https://en.wikipedia.org/wiki/Rpath Regards Kai > Thank you. > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From Kai.Koehne at theqtcompany.com Mon Feb 22 07:26:05 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 22 Feb 2016 06:26:05 +0000 Subject: [Interest] Interest Digest, Vol 53, Issue 19 In-Reply-To: References: Message-ID: > -----Original Message----- > From: Interest [mailto:interest- > bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of > Dmytro Haponov > Sent: Saturday, February 20, 2016 3:39 PM > To: interest at qt-project.org > Subject: Re: [Interest] Interest Digest, Vol 53, Issue 19 > > what is the right way to communicate up here? Please don't use digest mails if you want to participate. You can change your subscription options at http://lists.qt-project.org/mailman/listinfo/interest (I can't really comment on your actual issue). Regards Kai From Kai.Koehne at theqtcompany.com Mon Feb 22 07:33:44 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 22 Feb 2016 06:33:44 +0000 Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with QWebEngine In-Reply-To: References: Message-ID: > -----Original Message----- > From: Interest [mailto:interest- > bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of > NoRulez > Sent: Sunday, February 21, 2016 4:14 AM > To: QtWebEngine MailingList ; Qt Project > MailingList > Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with > QWebEngine > > Hello, > > first, I know that I can't use QNetworkCookieJar with QWebEngine, but what > are the new alternatives to set the CookieJar and Proxy settings with > QWebEngine? Qt 5.6 will feature a QWebEngineCookieStore: https://doc-snapshots.qt.io/qt5-5.6/qwebenginecookiestore.html If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise, Qt WebEngine automatically picks up the proxy configuration from OS X and Windows. > Users which saved cookies with CookieJar (ini file) from QWebKit, how can > these load an save those with QWebEngine? I guess you can do this manually with the API in QWebEngineCookieStore. > It was possible with Qt5.5 but now with Qt5.6 beta it isn't! Could you elaborate? Regards Kai From igor.mironchik at gmail.com Mon Feb 22 07:55:02 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 09:55:02 +0300 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: References: <56CA94E2.8010907@gmail.com> Message-ID: <56CAB0C6.4050803@gmail.com> Hi, On 22.02.2016 09:22, Koehne Kai wrote: > >> -----Original Message----- >> From: Interest [mailto:interest- >> bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of Igor >> Mironchik >> Sent: Monday, February 22, 2016 5:56 AM >> To: interest at qt-project.org >> Subject: [Interest] Best practice to packages on Ubuntu with QtIF >> >> Hi, >> >> What is the best practices to create packages on Ubuntu with QtIF? >> >> I'm interested in one stuff: if my application consists of executable and >> shared libraries, so to application start I have to "export >> LD_LIBRARY_PATH=." in working directory. So my question is it possible to >> set LD_LIBRARY_PATH automatically? How can it be done? > Technically, you could provide a wrapper (myapp.sh). But you shouldn't do that. > You should rather utilize rpath, and set it e.g. to $ORIGIN > > https://en.wikipedia.org/wiki/Rpath Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full path to work correctly... From realnc at gmail.com Mon Feb 22 08:11:52 2016 From: realnc at gmail.com (Nikos Chantziaras) Date: Mon, 22 Feb 2016 09:11:52 +0200 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: <56CAB0C6.4050803@gmail.com> References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> Message-ID: On 22/02/16 08:55, Igor Mironchik wrote: > On 22.02.2016 09:22, Koehne Kai wrote: >> >> You should rather utilize rpath, and set it e.g. to $ORIGIN >> >> https://en.wikipedia.org/wiki/Rpath > > Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full > path to work correctly... qmake doesn't support it. You have to do it by hand: QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs And then I put all libraries in the "lib" directory of the execututable. (And this is obviously linker and platform specific.) From igor.mironchik at gmail.com Mon Feb 22 08:13:55 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 10:13:55 +0300 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> Message-ID: <56CAB533.7060009@gmail.com> Hi, Got it: QMAKE_RPATHDIR += ${ORIGIN} On 22.02.2016 10:11, Nikos Chantziaras wrote: > On 22/02/16 08:55, Igor Mironchik wrote: >> On 22.02.2016 09:22, Koehne Kai wrote: >>> >>> You should rather utilize rpath, and set it e.g. to $ORIGIN >>> >>> https://en.wikipedia.org/wiki/Rpath >> >> Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full >> path to work correctly... > > qmake doesn't support it. You have to do it by hand: > > QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs > > And then I put all libraries in the "lib" directory of the execututable. > > (And this is obviously linker and platform specific.) > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From realnc at gmail.com Mon Feb 22 08:26:40 2016 From: realnc at gmail.com (Nikos Chantziaras) Date: Mon, 22 Feb 2016 09:26:40 +0200 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: <56CAB533.7060009@gmail.com> References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> <56CAB533.7060009@gmail.com> Message-ID: That doesn't do anything useful. It just uses an absolute path. If you move the executable to a different directory, it stops working. You can verify that by looking at the Makefile. For example, here, this: QMAKE_RPATHDIR += ${ORIGIN} becomes: -Wl,-rpath,/home/realnc/projects/myapp/ Which is completely useless. Do do what you want, you really need to pass the string "$ORIGIN" to the linker: QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN This results in: -Wl,-rpath,$ORIGIN in the Makefile. On 22/02/16 09:13, Igor Mironchik wrote: > Hi, > > Got it: > > QMAKE_RPATHDIR += ${ORIGIN} > > On 22.02.2016 10:11, Nikos Chantziaras wrote: >> On 22/02/16 08:55, Igor Mironchik wrote: >>> On 22.02.2016 09:22, Koehne Kai wrote: >>>> >>>> You should rather utilize rpath, and set it e.g. to $ORIGIN >>>> >>>> https://en.wikipedia.org/wiki/Rpath >>> >>> Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full >>> path to work correctly... >> >> qmake doesn't support it. You have to do it by hand: >> >> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs >> >> And then I put all libraries in the "lib" directory of the execututable. >> >> (And this is obviously linker and platform specific.) >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > From igor.mironchik at gmail.com Mon Feb 22 09:31:46 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 11:31:46 +0300 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> <56CAB533.7060009@gmail.com> Message-ID: <56CAC772.2060409@gmail.com> In my Makefile I have: LFLAGS = -Wl,-O1 -Wl,-rpath,/home/igor/Qt/5.5/gcc_64 -Wl,-rpath,${ORIGIN} -Wl,-rpath,/home/igor/Qt/5.5/gcc_64/lib On 22.02.2016 10:26, Nikos Chantziaras wrote: > That doesn't do anything useful. It just uses an absolute path. If you > move the executable to a different directory, it stops working. > > You can verify that by looking at the Makefile. For example, here, this: > > QMAKE_RPATHDIR += ${ORIGIN} > > becomes: > > -Wl,-rpath,/home/realnc/projects/myapp/ > > Which is completely useless. > > Do do what you want, you really need to pass the string "$ORIGIN" to > the linker: > > QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN > > This results in: > > -Wl,-rpath,$ORIGIN > > in the Makefile. > > > On 22/02/16 09:13, Igor Mironchik wrote: >> Hi, >> >> Got it: >> >> QMAKE_RPATHDIR += ${ORIGIN} >> >> On 22.02.2016 10:11, Nikos Chantziaras wrote: >>> On 22/02/16 08:55, Igor Mironchik wrote: >>>> On 22.02.2016 09:22, Koehne Kai wrote: >>>>> >>>>> You should rather utilize rpath, and set it e.g. to $ORIGIN >>>>> >>>>> https://en.wikipedia.org/wiki/Rpath >>>> >>>> Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full >>>> path to work correctly... >>> >>> qmake doesn't support it. You have to do it by hand: >>> >>> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs >>> >>> And then I put all libraries in the "lib" directory of the >>> execututable. >>> >>> (And this is obviously linker and platform specific.) >>> >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >> > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From realnc at gmail.com Mon Feb 22 09:51:16 2016 From: realnc at gmail.com (Nikos Chantziaras) Date: Mon, 22 Feb 2016 10:51:16 +0200 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: <56CAC772.2060409@gmail.com> References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> <56CAB533.7060009@gmail.com> <56CAC772.2060409@gmail.com> Message-ID: That will not work. The rpath needs to be $ORIGIN. A string. Not a variable that is expanded. Also, I used the wrong syntax before. Escaping this string is difficult since it contains an "$". This should work: QMAKE_LFLAGS=-Wl,-rpath,\'\$\$ORIGIN\' If you use that one, you should find that your program keeps working even if you move the directory that contains it and the libraries to somewhere else. With your current method, the program will only work if the libraries are in "/home/igor/Qt/5.5/gcc_64", a hardcoded path. On 22/02/16 10:31, Igor Mironchik wrote: > In my Makefile I have: > > LFLAGS = -Wl,-O1 -Wl,-rpath,/home/igor/Qt/5.5/gcc_64 > -Wl,-rpath,${ORIGIN} -Wl,-rpath,/home/igor/Qt/5.5/gcc_64/lib > > > On 22.02.2016 10:26, Nikos Chantziaras wrote: >> That doesn't do anything useful. It just uses an absolute path. If you >> move the executable to a different directory, it stops working. >> >> You can verify that by looking at the Makefile. For example, here, this: >> >> QMAKE_RPATHDIR += ${ORIGIN} >> >> becomes: >> >> -Wl,-rpath,/home/realnc/projects/myapp/ >> >> Which is completely useless. >> >> Do do what you want, you really need to pass the string "$ORIGIN" to >> the linker: >> >> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN >> >> This results in: >> >> -Wl,-rpath,$ORIGIN >> >> in the Makefile. >> >> >> On 22/02/16 09:13, Igor Mironchik wrote: >>> Hi, >>> >>> Got it: >>> >>> QMAKE_RPATHDIR += ${ORIGIN} >>> >>> On 22.02.2016 10:11, Nikos Chantziaras wrote: >>>> On 22/02/16 08:55, Igor Mironchik wrote: >>>>> On 22.02.2016 09:22, Koehne Kai wrote: >>>>>> >>>>>> You should rather utilize rpath, and set it e.g. to $ORIGIN >>>>>> >>>>>> https://en.wikipedia.org/wiki/Rpath >>>>> >>>>> Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full >>>>> path to work correctly... >>>> >>>> qmake doesn't support it. You have to do it by hand: >>>> >>>> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs >>>> >>>> And then I put all libraries in the "lib" directory of the >>>> execututable. >>>> >>>> (And this is obviously linker and platform specific.) >>>> >>>> _______________________________________________ >>>> Interest mailing list >>>> Interest at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/interest >>> >> >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > From norulez at me.com Mon Feb 22 10:56:04 2016 From: norulez at me.com (NoRulez) Date: Mon, 22 Feb 2016 10:56:04 +0100 Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with QWebEngine In-Reply-To: References: Message-ID: <8F41253C-9EA9-4D23-86C6-C7CD671A9179@me.com> > Could you elaborate? In the Qt 5.5 examples there are a CookieJar example with QWebEngine. But in the Qt 5.6 beta this example and functions are removed. See for example: http://doc.qt.io/qt-5/qtwebenginewidgets-browser-cookiejar-cpp.html Best regards > Am 22.02.2016 um 07:33 schrieb Koehne Kai : > > > >> -----Original Message----- >> From: Interest [mailto:interest- >> bounces+kai.koehne=theqtcompany.com at qt-project.org] On Behalf Of >> NoRulez >> Sent: Sunday, February 21, 2016 4:14 AM >> To: QtWebEngine MailingList ; Qt Project >> MailingList >> Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with >> QWebEngine >> >> Hello, >> >> first, I know that I can't use QNetworkCookieJar with QWebEngine, but what >> are the new alternatives to set the CookieJar and Proxy settings with >> QWebEngine? > > Qt 5.6 will feature a QWebEngineCookieStore: https://doc-snapshots.qt.io/qt5-5.6/qwebenginecookiestore.html > > If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise, Qt WebEngine automatically picks up the proxy configuration from OS X and Windows. > >> Users which saved cookies with CookieJar (ini file) from QWebKit, how can >> these load an save those with QWebEngine? > > I guess you can do this manually with the API in QWebEngineCookieStore. > >> It was possible with Qt5.5 but now with Qt5.6 beta it isn't! > > Could you elaborate? > > Regards > > Kai From Kai.Koehne at theqtcompany.com Mon Feb 22 11:08:28 2016 From: Kai.Koehne at theqtcompany.com (Koehne Kai) Date: Mon, 22 Feb 2016 10:08:28 +0000 Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with QWebEngine In-Reply-To: <8F41253C-9EA9-4D23-86C6-C7CD671A9179@me.com> References: <8F41253C-9EA9-4D23-86C6-C7CD671A9179@me.com> Message-ID: > -----Original Message----- > From: NoRulez [mailto:norulez at me.com] > [...] > > Could you elaborate? > > > In the Qt 5.5 examples there are a CookieJar example with QWebEngine. But > in the Qt 5.6 beta this example and functions are removed. See for example: > http://doc.qt.io/qt-5/qtwebenginewidgets-browser-cookiejar-cpp.html It got only renamed: http://doc-snapshots.qt.io/qt5-5.7/qtwebengine-webenginewidgets-demobrowser-cookiejar-cpp.html But we btw now also added an explicit example for the new cookie API: http://doc-snapshots.qt.io/qt5-5.7/qtwebengine-webenginewidgets-cookiebrowser-example.html Regards Kai From carel.combrink at gmail.com Mon Feb 22 11:44:30 2016 From: carel.combrink at gmail.com (Carel Combrink) Date: Mon, 22 Feb 2016 12:44:30 +0200 Subject: [Interest] Qmake "requires" function Message-ID: Hi All, What is the syntax for using the qmake "requires" function? The documentation states the following: *Evaluates condition. If the condition is false, qmake skips this project (and its SUBDIRS) when building.* I want to use it to check if an environmental variable is set or not, if possible. But I can not figure out how the command is used (even for a basic test). I have tested with the following but cant seem to get a positive result: requires(true) requires(false) TEST_1= requires(isEmpty(TEST_1)) requires(!isEmpty(TEST_1)) TEST_2="Test" requires(isEmpty(TEST_2)) requires(!isEmpty(TEST_2)) requires(linux-g++) requires(win32) Any help will be appreciated, first of all of how the command should look and secondly information or assistance to check if an environmental variable is set for usage in the "requires" function. Regards, Carel -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.mironchik at gmail.com Mon Feb 22 12:17:15 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 14:17:15 +0300 Subject: [Interest] Best practice to packages on Ubuntu with QtIF In-Reply-To: References: <56CA94E2.8010907@gmail.com> <56CAB0C6.4050803@gmail.com> <56CAB533.7060009@gmail.com> <56CAC772.2060409@gmail.com> Message-ID: <56CAEE3B.2010507@gmail.com> Hi, On 22.02.2016 11:51, Nikos Chantziaras wrote: > That will not work. The rpath needs to be $ORIGIN. A string. Not a > variable that is expanded. > > Also, I used the wrong syntax before. Escaping this string is > difficult since it contains an "$". This should work: > > QMAKE_LFLAGS=-Wl,-rpath,\'\$\$ORIGIN\' > > If you use that one, you should find that your program keeps working > even if you move the directory that contains it and the libraries to > somewhere else. With your current method, the program will only work > if the libraries are in "/home/igor/Qt/5.5/gcc_64", a hardcoded path. Now I understand what are you talking about. You are right. I found the next solution in QtCreator sources: QMAKE_RPATHDIR += \$\$ORIGIN QMAKE_RPATHDIR += \$\$ORIGIN/../lib RPATH = $$join( QMAKE_RPATHDIR, ":" ) QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${RPATH}\' QMAKE_RPATHDIR = It works now. Thank you. > > > On 22/02/16 10:31, Igor Mironchik wrote: >> In my Makefile I have: >> >> LFLAGS = -Wl,-O1 -Wl,-rpath,/home/igor/Qt/5.5/gcc_64 >> -Wl,-rpath,${ORIGIN} -Wl,-rpath,/home/igor/Qt/5.5/gcc_64/lib >> >> >> On 22.02.2016 10:26, Nikos Chantziaras wrote: >>> That doesn't do anything useful. It just uses an absolute path. If you >>> move the executable to a different directory, it stops working. >>> >>> You can verify that by looking at the Makefile. For example, here, >>> this: >>> >>> QMAKE_RPATHDIR += ${ORIGIN} >>> >>> becomes: >>> >>> -Wl,-rpath,/home/realnc/projects/myapp/ >>> >>> Which is completely useless. >>> >>> Do do what you want, you really need to pass the string "$ORIGIN" to >>> the linker: >>> >>> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN >>> >>> This results in: >>> >>> -Wl,-rpath,$ORIGIN >>> >>> in the Makefile. >>> >>> >>> On 22/02/16 09:13, Igor Mironchik wrote: >>>> Hi, >>>> >>>> Got it: >>>> >>>> QMAKE_RPATHDIR += ${ORIGIN} >>>> >>>> On 22.02.2016 10:11, Nikos Chantziaras wrote: >>>>> On 22/02/16 08:55, Igor Mironchik wrote: >>>>>> On 22.02.2016 09:22, Koehne Kai wrote: >>>>>>> >>>>>>> You should rather utilize rpath, and set it e.g. to $ORIGIN >>>>>>> >>>>>>> https://en.wikipedia.org/wiki/Rpath >>>>>> >>>>>> Interesting, but "QMAKE_RPATHDIR += ." doesn't work. It require full >>>>>> path to work correctly... >>>>> >>>>> qmake doesn't support it. You have to do it by hand: >>>>> >>>>> QMAKE_LFLAGS += -Wl,-rpath,\$\$ORIGIN/libs >>>>> >>>>> And then I put all libraries in the "lib" directory of the >>>>> execututable. >>>>> >>>>> (And this is obviously linker and platform specific.) >>>>> >>>>> _______________________________________________ >>>>> Interest mailing list >>>>> Interest at qt-project.org >>>>> http://lists.qt-project.org/mailman/listinfo/interest >>>> >>> >>> >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >> > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From sinadooru at gmail.com Mon Feb 22 13:14:41 2016 From: sinadooru at gmail.com (Sina Dogru) Date: Mon, 22 Feb 2016 14:14:41 +0200 Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events Message-ID: Hello, I am implementing a custom scene graph item, which inherits QQuickItem . class CustomItem : public QQuickItem { Q_OBJECTpublic: CustomItem() { setAcceptHoverEvents(true); setAcceptedMouseButtons(Qt::LeftButton); setFlag(ItemHasContents); }protected: QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; void hoverEnterEvent(QHoverEvent *e) override; void hoverLeaveEvent(QHoverEvent *e) override; void hoverMoveEvent(QHoverEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override; void mouseReleaseEvent(QMouseEvent *e) override; void mousePressEvent(QMouseEvent *e) override; }; And I use that CustomItem as a visual parent to some QML Types, like Rectangle . CustomItem { id: custom width: 400; height: 400 Rectangle { id: rect z: -1 anchors.fill: parent color: "blue" } } Everything was perfect, I was able to draw over the visual childrens using 'z' property with overriding QQuickItem::updatePaintNode. But the problem raised when I use MouseArea as a children of my 'CustomItem'. CustomItem { id: custom width: 400; height: 400 Rectangle { id: rect z: -1 anchors.fill: parent color: "blue" } MouseArea { anchors.fill: parent propagateComposedEvents: true drag.target: parent drag.axis: Drag.XandYAxis } } After that, my 'CustomItem' was not getting the mouse events like QQuickItem::hoverEnterEvent , QQuickItem::mousePressEvent or QQuickItem::mouseMoveEvent which those are crucial to implement in my case. I am not sure if this even possible or am I doing something wrong? If there is a candidate solution for that particular problem, I would be happy to try it. Note: Here is a similar question on StackOverFlow which have not been replied. I have already asked it question on QtForums . -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oehlinger at avibit.com Mon Feb 22 13:23:07 2016 From: r.oehlinger at avibit.com (=?ISO-8859-1?Q?Richard_=D6hlinger?=) Date: Mon, 22 Feb 2016 13:23:07 +0100 Subject: [Interest] How to log all JavaScript Exceptions or how to refactor QML Message-ID: <56CAFDAB.8050300@avibit.com> While developing with QML I often come across a problems relating to thrown JavaScript Errors. It would help a lot to have the possibility to log all JavaScript exceptions. There is QML_DUMP_ERRORS, but it won't cover the most nasty, hard to track down errors. E.g. function doSomething() { var object = getSomeObject() var value = object.prop.function() // If property prop does not exist, an exeption will be thrown, but nobody will notice that instantly //... unreachable console.log(value) } This is a huge burden on re-factoring QML code. Easy to detect "static errors", which would be an compile error in c++, will be only detected once the appliction is tested thoroughly. There is plenty more, where a JavaScript exception is issued but never presented to the developer/user. It's not feasible to have a try-catch in every binding to catch errors in longer code snippets. Is there an idea to tackle such an issue? Thanks From neil+qt at copycopy.cc Mon Feb 22 13:39:58 2016 From: neil+qt at copycopy.cc (Neil Williams) Date: Mon, 22 Feb 2016 12:39:58 +0000 Subject: [Interest] Disabling open-gl but dynamically detect ANGLE or software renderer based off blacklist Message-ID: We recently enabled switched our app over from forced ANGLE (via AA_useOpenGLES) to the dynamic detection, however this has resulted in a large increase in crash reports from users so we would like to go back to using ANGLE but we would like to allow software rendering too based on the included openglblacklists/default.json file. Is it possible to configure qt like this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitch.curtis at theqtcompany.com Mon Feb 22 13:40:28 2016 From: mitch.curtis at theqtcompany.com (Curtis Mitch) Date: Mon, 22 Feb 2016 12:40:28 +0000 Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events In-Reply-To: References: Message-ID: From: Interest [mailto:interest-bounces+mitch.curtis=theqtcompany.com at qt-project.org] On Behalf Of Sina Dogru Sent: Monday, 22 February 2016 1:15 PM To: interest at qt-project.org Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events Hello, I am implementing a custom scene graph item, which inherits QQuickItem. class CustomItem : public QQuickItem { Q_OBJECT public: CustomItem() { setAcceptHoverEvents(true); setAcceptedMouseButtons(Qt::LeftButton); setFlag(ItemHasContents); } protected: QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; void hoverEnterEvent(QHoverEvent *e) override; void hoverLeaveEvent(QHoverEvent *e) override; void hoverMoveEvent(QHoverEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override; void mouseReleaseEvent(QMouseEvent *e) override; void mousePressEvent(QMouseEvent *e) override; }; And I use that CustomItem as a visual parent to some QML Types, like Rectangle. CustomItem { id: custom width: 400; height: 400 Rectangle { id: rect z: -1 anchors.fill: parent color: "blue" } } Everything was perfect, I was able to draw over the visual childrens using 'z' property with overriding QQuickItem::updatePaintNode. But the problem raised when I use MouseArea as a children of my 'CustomItem'. CustomItem { id: custom width: 400; height: 400 Rectangle { id: rect z: -1 anchors.fill: parent color: "blue" } MouseArea { anchors.fill: parent propagateComposedEvents: true drag.target: parent drag.axis: Drag.XandYAxis } } After that, my 'CustomItem' was not getting the mouse events like QQuickItem::hoverEnterEvent , QQuickItem::mousePressEvent or QQuickItem::mouseMoveEvent which those are crucial to implement in my case. I am not sure if this even possible or am I doing something wrong? If there is a candidate solution for that particular problem, I would be happy to try it. Note: Here is a similar question on StackOverFlow which have not been replied. There is an answer for that question. What happens if you try it? You can also try setting propagateComposedEvents to true: http://doc.qt.io/qt-5/qml-qtquick-mousearea.html#propagateComposedEvents-prop I have already asked it question on QtForums. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sinadooru at gmail.com Mon Feb 22 13:43:19 2016 From: sinadooru at gmail.com (Sina Dogru) Date: Mon, 22 Feb 2016 14:43:19 +0200 Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events In-Reply-To: References: Message-ID: Thank you Curtis but as you can see it on my code snippet on the question, I have already tried to set 'propagateComposedEvents' to true. But it did not worked :S 2016-02-22 14:40 GMT+02:00 Curtis Mitch : > > > > > *From:* Interest [mailto:interest-bounces+mitch.curtis= > theqtcompany.com at qt-project.org] *On Behalf Of *Sina Dogru > *Sent:* Monday, 22 February 2016 1:15 PM > *To:* interest at qt-project.org > *Subject:* [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse > events > > > > Hello, > > I am implementing a custom scene graph item, which inherits QQuickItem > . > > class CustomItem : public QQuickItem { > > Q_OBJECT > > public: > > CustomItem() > > { > > setAcceptHoverEvents(true); > > setAcceptedMouseButtons(Qt::LeftButton); > > setFlag(ItemHasContents); > > } > > protected: > > QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; > > > > void hoverEnterEvent(QHoverEvent *e) override; > > void hoverLeaveEvent(QHoverEvent *e) override; > > void hoverMoveEvent(QHoverEvent *e) override; > > > > void mouseMoveEvent(QMouseEvent *e) override; > > void mouseReleaseEvent(QMouseEvent *e) override; > > void mousePressEvent(QMouseEvent *e) override; > > }; > > > > And I use that CustomItem as a visual parent to some QML Types, like > Rectangle . > > CustomItem { > > id: custom > > width: 400; height: 400 > > Rectangle { > > id: rect > > z: -1 > > anchors.fill: parent > > color: "blue" > > } > > } > > Everything was perfect, I was able to draw over the visual childrens using > 'z' property with overriding QQuickItem::updatePaintNode. > > But the problem raised when I use MouseArea > as a children of my > 'CustomItem'. > > CustomItem { > > id: custom > > width: 400; height: 400 > > Rectangle { > > id: rect > > z: -1 > > anchors.fill: parent > > color: "blue" > > } > > MouseArea { > > anchors.fill: parent > > propagateComposedEvents: true > > drag.target: parent > > drag.axis: Drag.XandYAxis > > } > > } > > After that, my 'CustomItem' was not getting the mouse events like > QQuickItem::hoverEnterEvent > , > QQuickItem::mousePressEvent > > or QQuickItem::mouseMoveEvent > which those are > crucial to implement in my case. > > I am not sure if this even possible or am I doing something wrong? If > there is a candidate solution for that particular problem, I would be happy > to try it. > > Note: Here is a similar question on StackOverFlow > > which have not been replied. > > > > There is an answer for that question. What happens if you try it? You can > also try setting propagateComposedEvents to true: > > > http://doc.qt.io/qt-5/qml-qtquick-mousearea.html#propagateComposedEvents-prop > > I have already asked it question on QtForums > > . > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitch.curtis at theqtcompany.com Mon Feb 22 13:51:13 2016 From: mitch.curtis at theqtcompany.com (Curtis Mitch) Date: Mon, 22 Feb 2016 12:51:13 +0000 Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events In-Reply-To: References: Message-ID: From: Sina Dogru [mailto:sinadooru at gmail.com] Sent: Monday, 22 February 2016 1:43 PM To: Curtis Mitch Cc: interest at qt-project.org Subject: Re: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events Thank you Curtis but as you can see it on my code snippet on the question, I have already tried to set 'propagateComposedEvents' to true. But it did not worked :S And what about the answer on Stack Overflow? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeanmichael.celerier at gmail.com Mon Feb 22 14:43:57 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Mon, 22 Feb 2016 14:43:57 +0100 Subject: [Interest] Tempalted QObjects Message-ID: Hello, Following Oliver Goffart's blog bost : https://woboq.com/blog/moc-myths.html "For example, I implemented support for templated QObjects in moc , but this was not merged because it did not raise enough interest within the Qt project." I would personnally be quite interested in this feature. Who doesn't like good generic code ? :) And I am pretty sure that this would enable wonderful new uses of QObject. Maybe if enough persons manifest themselves on the mailing list ? Best regards, Jean-Michaël www.i-score.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From sinadooru at gmail.com Mon Feb 22 15:02:58 2016 From: sinadooru at gmail.com (Sina Dogru) Date: Mon, 22 Feb 2016 16:02:58 +0200 Subject: [Interest] MouseArea blocks 'Custom Scene Graph Item's mouse events In-Reply-To: References: Message-ID: So stackoverflow answer is partially right but my mind is so confused. Well, if I set 'mouse.accepted' to false in the 'press' handler of the MouseArea, event dispatcher sends the mouse events to MouseArea and also to the QQuickItem::mousePressEvent. It is ok but somehow, MouseArea lose it dragging capabality if I set 'mouse.accepted' to false in 'press' handler of MouseArea. 2016-02-22 14:51 GMT+02:00 Curtis Mitch : > > > > > *From:* Sina Dogru [mailto:sinadooru at gmail.com] > *Sent:* Monday, 22 February 2016 1:43 PM > *To:* Curtis Mitch > *Cc:* interest at qt-project.org > *Subject:* Re: [Interest] MouseArea blocks 'Custom Scene Graph Item's > mouse events > > > > Thank you Curtis but as you can see it on my code snippet on the question, > I have already tried to set 'propagateComposedEvents' to true. But it did > not worked :S > > > > > > And what about the answer on Stack Overflow? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From igor.mironchik at gmail.com Mon Feb 22 16:32:44 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 18:32:44 +0300 Subject: [Interest] Tempalted QObjects In-Reply-To: References: Message-ID: <56CB2A1C.7090601@gmail.com> Hello. On 22.02.2016 16:43, Jean-Michaël Celerier wrote: > Hello, > Following Oliver Goffart's blog bost : > > https://woboq.com/blog/moc-myths.html > > "For example, I implemented support for templated QObjects in moc > , but this was not merged > because it did not raise enough interest within the Qt project." > > I would personnally be quite interested in this feature. Who doesn't > like good generic code ? :) And I am pretty sure that this would > enable wonderful new uses of QObject. I agree, templated QObject is very nice feature. Few times I used templates with QObjects, workaround is simple: you declare QObject-based class, define signals, slots in it... And then declare templated class derived from that that derived from QObject. But native support of templated QObject-based classes would be much more better. > > Maybe if enough persons manifest themselves on the mailing list ? I sign you manifest :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeanmichael.celerier at gmail.com Mon Feb 22 16:39:29 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Mon, 22 Feb 2016 16:39:29 +0100 Subject: [Interest] Tempalted QObjects In-Reply-To: <56CB2A1C.7090601@gmail.com> References: <56CB2A1C.7090601@gmail.com> Message-ID: This is what I do too, but this would (hopefully) enable features such as sending signals with an argument parametrized on the parent class type. Some hack that I had to do this once (I since moved to another library for signals / slots but I'd rather only use Qt's) : https://github.com/OSSIA/i-score/blob/ce33563c76bfdfef9e55a34a713262d84825d1a0/base/lib/iscore/tools/NotifyingMap.hpp https://github.com/OSSIA/i-score/blob/ce33563c76bfdfef9e55a34a713262d84825d1a0/base/lib/iscore/tools/NotifyingMap_impl.hpp Thanks :) Jean-Michaël On Mon, Feb 22, 2016 at 4:32 PM, Igor Mironchik wrote: > Hello. > > On 22.02.2016 16:43, Jean-Michaël Celerier wrote: > > Hello, > Following Oliver Goffart's blog bost : > > https://woboq.com/blog/moc-myths.html > > "For example, I implemented support for templated QObjects in moc > , but this was not merged > because it did not raise enough interest within the Qt project." > > I would personnally be quite interested in this feature. Who doesn't like > good generic code ? :) And I am pretty sure that this would enable > wonderful new uses of QObject. > > > I agree, templated QObject is very nice feature. Few times I used > templates with QObjects, workaround is simple: you declare QObject-based > class, define signals, slots in it... And then declare templated class > derived from that that derived from QObject. But native support of > templated QObject-based classes would be much more better. > > > Maybe if enough persons manifest themselves on the mailing list ? > > > I sign you manifest :) > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhihn at gmx.com Mon Feb 22 16:51:28 2016 From: jhihn at gmx.com (Jason H) Date: Mon, 22 Feb 2016 16:51:28 +0100 Subject: [Interest] Preventing iOS/Android device sleep Message-ID: I have an app that records video. If the user records more than the display timeout, the display goes black. Is there a way in Qt 5.5 or 5.6 to prevent the device sleep? I know android will require a WAKE_LOCK permissions. Ideally these this will only be in place while the video recording is active. From nunosantos at imaginando.pt Mon Feb 22 16:57:26 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Mon, 22 Feb 2016 15:57:26 +0000 Subject: [Interest] Preventing iOS/Android device sleep In-Reply-To: References: Message-ID: <5A077C1A-B1DE-404E-971D-8416F68FAB40@imaginando.pt> Jason, You need to call [application setIdleTimerDisabled:YES/NO]; - (void)applicationWillResignActive:(UIApplication *)application { [application setIdleTimerDisabled:NO]; } - (void)applicationDidEnterBackground:(UIApplication *)application { [application setIdleTimerDisabled:NO]; } - (void)applicationWillEnterForeground:(UIApplication *)application { [application setIdleTimerDisabled:YES]; } - (void)applicationDidBecomeActive:(UIApplication *)application { [application setIdleTimerDisabled:YES]; } -(void)applicationWillTerminate:(UIApplication *)application { [application setIdleTimerDisabled:NO]; } Regards, Nuno Santos Founder / CEO / CTO www.imaginando.pt +351 91 621 69 62 > On 22 Feb 2016, at 15:51, Jason H wrote: > > I have an app that records video. If the user records more than the display timeout, the display goes black. > > Is there a way in Qt 5.5 or 5.6 to prevent the device sleep? I know android will require a WAKE_LOCK permissions. > > Ideally these this will only be in place while the video recording is active. > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Mon Feb 22 17:01:14 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 22 Feb 2016 08:01:14 -0800 Subject: [Interest] Qmake "requires" function In-Reply-To: References: Message-ID: <4116405.4WKZLXcTtm@tjmaciei-mobl4> On segunda-feira, 22 de fevereiro de 2016 12:44:30 PST Carel Combrink wrote: > I have tested with the following but cant seem to get a positive result: Please give a concrete usecase. Obviously you don't have both > requires(true) > > requires(false) In your .pro file. Please also explain what you mean by "a positive result". I've just tested a .pro file containing "requires(false)" and it produced a Makefile that just does: @echo "Some of the required modules (false) are not available." @echo "Skipped." -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Mon Feb 22 17:07:51 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 22 Feb 2016 08:07:51 -0800 Subject: [Interest] Tempalted QObjects In-Reply-To: References: Message-ID: <1570413.VTGT6AmsgO@tjmaciei-mobl4> On segunda-feira, 22 de fevereiro de 2016 14:43:57 PST Jean-Michaël Celerier wrote: > Hello, > Following Oliver Goffart's blog bost : > > https://woboq.com/blog/moc-myths.html > > "For example, I implemented support for templated QObjects in moc > , but this was not merged because > it did not raise enough interest within the Qt project." > > I would personnally be quite interested in this feature. Who doesn't like > good generic code ? :) And I am pretty sure that this would enable > wonderful new uses of QObject. > > Maybe if enough persons manifest themselves on the mailing list ? Not even that. The required condition is that someone figure out how to provide a meta object to template classes. The current solution would require installing the file generated by moc, #include'ing it from your class's header file, and modifying the internal format heavily (i.e., a Qt 6.0 task). This is unlikely to change in the current C++ language. If you want templated QObjects, please join SG7 discussion group in isocpp.org and help define reflection for C++. Then hopefully Qt will be able to use this feature in the early 2020s. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From igor.mironchik at gmail.com Mon Feb 22 18:08:00 2016 From: igor.mironchik at gmail.com (Igor Mironchik) Date: Mon, 22 Feb 2016 20:08:00 +0300 Subject: [Interest] Tempalted QObjects In-Reply-To: <1570413.VTGT6AmsgO@tjmaciei-mobl4> References: <1570413.VTGT6AmsgO@tjmaciei-mobl4> Message-ID: <56CB4070.6000408@gmail.com> On 22.02.2016 19:07, Thiago Macieira wrote: > On segunda-feira, 22 de fevereiro de 2016 14:43:57 PST Jean-Michaël Celerier > wrote: >> Hello, >> Following Oliver Goffart's blog bost : >> >> https://woboq.com/blog/moc-myths.html >> >> "For example, I implemented support for templated QObjects in moc >> , but this was not merged because >> it did not raise enough interest within the Qt project." >> >> I would personnally be quite interested in this feature. Who doesn't like >> good generic code ? :) And I am pretty sure that this would enable >> wonderful new uses of QObject. >> >> Maybe if enough persons manifest themselves on the mailing list ? > Not even that. > > The required condition is that someone figure out how to provide a meta object > to template classes. The current solution would require installing the file > generated by moc, #include'ing it from your class's header file, and modifying > the internal format heavily (i.e., a Qt 6.0 task). > > This is unlikely to change in the current C++ language. If you want templated > QObjects, please join SG7 discussion group in isocpp.org and help define > reflection for C++. Then hopefully Qt will be able to use this feature in the > early 2020s. Сircumstantially encouraged :) From Stefan.Walter at lisec.com Tue Feb 23 06:34:03 2016 From: Stefan.Walter at lisec.com (Walter Stefan) Date: Tue, 23 Feb 2016 05:34:03 +0000 Subject: [Interest] QJSEngine replacement for QScriptEngine misses newFunction Message-ID: Hi, I am looking into migrating my code to QJSEngine, because of the deprecation of the QScriptEngine (QtScript). As we have used the functionality of newFunction very extensive and all related scripts are depending on this, the newFunction in QJSEngine is for us mandatory or something that creates and equivalent result. How do I currently map a native C++ class member function to the engine: QScriptValue func_sqrt = m_engine->newFunction(sqrt, liEngine); m_engine->globalObject().setProperty("sqrt", func_sqrt, QScriptValue::ReadOnly | QScriptValue::Undeletable); This is an example of a native function: QScriptValue ScriptModuleMath::sqrt(QScriptContext *context, QScriptEngine *engine, void *arg) { Q_UNUSED(engine) Q_UNUSED(arg) if (context->argumentCount()!=1) { return context->throwError( QScriptContext::SyntaxError, "sqrt(...): illegal number of arguments."); } else if (!context->argument(0).isNumber()) { return context->throwError( QScriptContext::SyntaxError, "sqrt(...): argument 1 is not a number."); } return qSqrt(context->argument(0).toNumber()); } And in this way. I can use it then in the script: value = sqrt(4); I actually don't want to map a whole QObject, because that would require a call like this: value = MyMath.sqrt(4); Is there any way to achive in QJSEngine the same result as I do within the QScriptEngine? Best Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From carel.combrink at gmail.com Tue Feb 23 06:51:13 2016 From: carel.combrink at gmail.com (Carel Combrink) Date: Tue, 23 Feb 2016 07:51:13 +0200 Subject: [Interest] Qmake "requires" function In-Reply-To: <4116405.4WKZLXcTtm@tjmaciei-mobl4> References: <4116405.4WKZLXcTtm@tjmaciei-mobl4> Message-ID: Morning Thiago, > Please give a concrete usecase. > I have developed a framework that contains a set of libraries using subdirs template. One library needs specific tools to be installed before it can be built. My initial implementation was to pass a argument to qmake to enable this library if you have the correct tools installed into the correct locations. This was working but looking through the qmake docs I came across the "requires" test. So I started playing with the idea to check for an environmental variable and if set, enable the specific library. That is when I started getting stuck. > > requires(true) > > > > requires(false) > > In your .pro file. > > Please also explain what you mean by "a positive result". I had the following code in my pro file: requires(true) requires(false) To force it to fail, to test the requires() function. So the issue that I have: Before starting to test the requires() function I had the following in my code to test for the env var: MY_ENV_VAR_TEST=$$(MY_ENV_VAR) isEmpty(MY_ENV_VAR_TEST) { error("The env var MY_ENV_VAR must be set when enabling this library") } *PS: Is there a better way to check if an environmental variable is set using qmake that is cross platform for Linux, Windows and Mac? * Even with the forced fail (as above) qmake was interrupted with the error above. I was hoping/expecting that it would break out at the forced requires(false) before interrupting the whole qmake process due to the error message. > I've just tested a > .pro file containing "requires(false)" and it produced a Makefile that just > does: > > @echo "Some of the required modules (false) are not available." > @echo "Skipped." > If I remove the error("...") as mentioned above, I get the same behaviour that you get. So what is failing: in my pro file: requires(false) error("Should not get here") My conclusion: It does seem like qmake will evaluate the whole pro file even past the "requires(false)" and fail completely on error messages. For now I removed the error message and it seems like it behaves as expected. Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Tue Feb 23 07:09:32 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 22 Feb 2016 22:09:32 -0800 Subject: [Interest] Qmake "requires" function In-Reply-To: References: <4116405.4WKZLXcTtm@tjmaciei-mobl4> Message-ID: <8420353.DehUncASNr@tjmaciei-mobl4> On terça-feira, 23 de fevereiro de 2016 07:51:13 PST Carel Combrink wrote: > I had the following code in my pro file: > > requires(true) > requires(false) > > To force it to fail, to test the requires() function. As I said, the requires(false) predicate does work: it produces a Makefile that prints a warning and does nothing else. As documented, like you pasted. > So the issue that I have: > Before starting to test the requires() function I had the following in my > code to test for the env var: > MY_ENV_VAR_TEST=$$(MY_ENV_VAR) > isEmpty(MY_ENV_VAR_TEST) { > error("The env var MY_ENV_VAR must be set when enabling this library") > } > > *PS: Is there a better way to check if an environmental variable is set > using qmake that is cross platform for Linux, Windows and Mac? * The above should work. If you were having problems, say what they were. > Even with the forced fail (as above) qmake was interrupted with the error > above. I was hoping/expecting that it would break out at the > forced requires(false) before interrupting the whole qmake process due to > the error message. requires() with a false predicate does not interrupt execution. It creates a Makefile that doesn't do anything. error() interrupts execution. > So what is failing: > in my pro file: > > requires(false) > > error("Should not get here") Wrong expectation. It will get here. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From carel.combrink at gmail.com Tue Feb 23 07:34:25 2016 From: carel.combrink at gmail.com (Carel Combrink) Date: Tue, 23 Feb 2016 08:34:25 +0200 Subject: [Interest] Qmake "requires" function In-Reply-To: <8420353.DehUncASNr@tjmaciei-mobl4> References: <4116405.4WKZLXcTtm@tjmaciei-mobl4> <8420353.DehUncASNr@tjmaciei-mobl4> Message-ID: Thiago, > MY_ENV_VAR_TEST=$$(MY_ENV_VAR) > > isEmpty(MY_ENV_VAR_TEST) { > > error("The env var MY_ENV_VAR must be set when enabling this > library") > > } > > > > *PS: Is there a better way to check if an environmental variable is set > > using qmake that is cross platform for Linux, Windows and Mac? * > > The above should work. If you were having problems, say what they were. Thanks, no issue so far, just wanted to find out if there was another way. requires() with a false predicate does not interrupt execution. It creates a > Makefile that doesn't do anything. > > error() interrupts execution. > It makes sense, just not what I expected initially. Thank you for the valued input. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jordon.wu at gmail.com Tue Feb 23 08:04:27 2016 From: jordon.wu at gmail.com (Jordon Wu) Date: Tue, 23 Feb 2016 15:04:27 +0800 Subject: [Interest] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh? Message-ID: Hi list all, I'm begin study qt3d(qt5.5 version) now. And I want to found some examples about 3d model mesh and sub mesh operation. I google found a good example QtQuick3D Tutorial - Car3D ( http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is V1.0 and the example did not run on qt3d 5.5 or later. Has anyone know where could found example about qt3d to operate 3d model mesh and sub mesh like above Car3D examples ? Thanks Best Regards Jordon Wu -------------- next part -------------- An HTML attachment was scrubbed... URL: From gm at mes-ia.de Tue Feb 23 08:38:02 2016 From: gm at mes-ia.de (=?UTF-8?Q?G=c3=bcnter_Michel?=) Date: Tue, 23 Feb 2016 08:38:02 +0100 Subject: [Interest] Behaviour difference between Qt Version 5.4-0 and 5.5.1 Message-ID: <56CC0C5A.8070401@mes-ia.de> I notice a behaviour difference between Qt Version 5.4.0 and 5.5.1 in respect to network events. My application communicates via QTcpSockets to a Qt Server Process using the same Qt Version. While moving my 'Top Level Widget' ( QMainWindow or QDialog ) the 'readyRead' Signal doesn't occure anymore, till I release the mouse in the titlebar. The same thing happens, when resizing the window ( seams to be related to window manager frame events ) Timer events work, so the server gets new requests. On 5.4.0 'readyRead' Signal is delivered without problems. Qt 5.6. Beta has the same problem. Is this a bug? Do yo know a workaround ? Thanks in advance From sh at theharmers.co.uk Tue Feb 23 08:58:55 2016 From: sh at theharmers.co.uk (Sean Harmer) Date: Tue, 23 Feb 2016 07:58:55 +0000 Subject: [Interest] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh? In-Reply-To: References: Message-ID: <56CC113F.4080901@theharmers.co.uk> Hi, On 23/02/2016 07:04, Jordon Wu wrote: > Hi list all, > > I'm begin study qt3d(qt5.5 version) now. And I want to found some > examples about 3d model mesh and sub mesh operation. > > I google found a good example QtQuick3D Tutorial - Car3D ( > http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is V1.0 > and the example did not run on qt3d 5.5 or later. > > Has anyone know where could found example about qt3d to operate 3d > model mesh and sub mesh like above Car3D examples ? Thanks Well, in making of this car demo, https://www.youtube.com/watch?v=zCBESbHSR1k we simply exported the submeshes we needed explicit control over as separate obj files and loaded each one usign a Mesh component aggregated to an Entity. Each Entity has it's own Transform component that we then bind properties to QML expressions that reference the Qt Quick Controls, e.g. slider values or boolean switches. You can also have all meshes in a single OBJ file and reference the sub mesh you wish to render in the Mesh component. We tried this but found it to be better to split them out as it allows more work to be done in parallel at start up, leading to faster startup times. Cheers, Sean > > > Best Regards > > Jordon Wu > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at bawue.de Tue Feb 23 12:11:41 2016 From: steve at bawue.de (Stephen Bryant) Date: Tue, 23 Feb 2016 12:11:41 +0100 Subject: [Interest] QJSEngine replacement for QScriptEngine misses newFunction In-Reply-To: References: Message-ID: <6373531.dZ2Y46ONiW@office-pc> Hi Stefan, On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: [...] > > And in this way. I can use it then in the script: > value = sqrt(4); > > I actually don't want to map a whole QObject, because that would require a > call like this: value = MyMath.sqrt(4); > > Is there any way to achive in QJSEngine the same result as I do within the > QScriptEngine? Is far as I know, the only way is to do the thing you don't want to: map the whole QObject. You can, however, add a JS function reference inside the engine so you can call the function without the object name. QJSEngine engine; engine.globalObject().setProperty( "MyMath", engine.newQObject( new ScriptModuleMath( &engine ) ) ); engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions This will now work in JS: value = sqrt(4); You'll presumably be aware that all public slots of MyMath will automatically be available as JS functions. That makes things a little easier. It seems that you also need a QObject instance, event if you only want to expose static methods. BTW: your C++ native function can use this signature: double sqrt(double); You'll get NaN if somebody calls it with a non-number. The return value is also automatically converted as there is a QJSValue constructor that takes a double. There's no direct equivalent of read-only/undeletable, unfortunately. I'm missing that too. The closest you can get is that your MyMath functions can't be altered from JS, and you can also make a read-only Q_PROPERTY. However, there is nothing stopping somebody from reassigning properties of the global object - so your 'sqrt' function and 'MyMath' object could be replaced. This may be a security concern, depending on what you're doing. Best regards, Steve From nib952051 at gmail.com Tue Feb 23 12:48:04 2016 From: nib952051 at gmail.com (nikita baryshnikov) Date: Tue, 23 Feb 2016 14:48:04 +0300 Subject: [Interest] QJSEngine replacement for QScriptEngine misses newFunction In-Reply-To: <6373531.dZ2Y46ONiW@office-pc> References: <6373531.dZ2Y46ONiW@office-pc> Message-ID: As a workaround you can use QQmlContext::setContextObject: QQmlEngine::rootContext()->setContextObject(myMath); On Tue, Feb 23, 2016 at 2:11 PM, Stephen Bryant wrote: > Hi Stefan, > > On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: > [...] >> >> And in this way. I can use it then in the script: >> value = sqrt(4); >> >> I actually don't want to map a whole QObject, because that would require a >> call like this: value = MyMath.sqrt(4); >> >> Is there any way to achive in QJSEngine the same result as I do within the >> QScriptEngine? > > > Is far as I know, the only way is to do the thing you don't want to: map the > whole QObject. You can, however, add a JS function reference inside the > engine so you can call the function without the object name. > > QJSEngine engine; > engine.globalObject().setProperty( > "MyMath", > engine.newQObject( new ScriptModuleMath( &engine ) ) > ); > engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions > > This will now work in JS: value = sqrt(4); > > You'll presumably be aware that all public slots of MyMath will automatically > be available as JS functions. That makes things a little easier. > > It seems that you also need a QObject instance, event if you only want to > expose static methods. > > BTW: your C++ native function can use this signature: double sqrt(double); > You'll get NaN if somebody calls it with a non-number. The return value is > also automatically converted as there is a QJSValue constructor that takes a > double. > > > There's no direct equivalent of read-only/undeletable, unfortunately. I'm > missing that too. The closest you can get is that your MyMath functions can't > be altered from JS, and you can also make a read-only Q_PROPERTY. > > However, there is nothing stopping somebody from reassigning properties of the > global object - so your 'sqrt' function and 'MyMath' object could be replaced. > This may be a security concern, depending on what you're doing. > > > Best regards, > > Steve > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From ev.mipt at gmail.com Tue Feb 23 19:32:52 2016 From: ev.mipt at gmail.com (Oleg Evseev) Date: Tue, 23 Feb 2016 21:32:52 +0300 Subject: [Interest] [QT3D] Undefined references when build QT3D for Android in QtCreator Message-ID: Hello, I've installed qt-opensource-windows-x86-android-5.6.0-beta.exe and built different Qt3D applications for windows and android - all works. I've download sources for QT3D (5.6.0-beta branch), modified them and have able to build it for windows from QtCreator (just open the qt3d project and build), then i could use new added functions in my application - all works. But I can't build qt3d for android in QtCreator. Got about 300 "undefined reference" problems (from include\QtCore\ headers and qgltf.cpp) for QByteArray functions (append, reallocData, etc.), QString, QHashData, QTextStream, QDebug, QFile, QJsonObject and so on. And at the end about ten undefined references for z_... functions (z_inflate, z_inflateInit_, etc.) from src\3rdparty\assimp\code Errors thrown when compiling libqgltf.so and set of objects in tools/qgltf just in case, flags -LC:/Qt/5.6/5.6/android_armv7/lib and -lz are presented in build console command bin/arm-linux-androideabi-g++ Windows 7 x64, Qt 5.6.0 beta, Qt Creator 3.6.0 Thanks in advance for help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Tue Feb 23 22:05:27 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Tue, 23 Feb 2016 13:05:27 -0800 Subject: [Interest] Behaviour difference between Qt Version 5.4-0 and 5.5.1 In-Reply-To: <56CC0C5A.8070401@mes-ia.de> References: <56CC0C5A.8070401@mes-ia.de> Message-ID: <1970888.ElBctzSoMj@tjmaciei-mobl4> On terça-feira, 23 de fevereiro de 2016 08:38:02 PST Günter Michel wrote: > Is this a bug? Do yo know a workaround ? It's known and fixed with commit 02f70004c266f4c35f098f49cfb3ca0284e28cac ("Allow socket events processing with a foreign event loop on Windows"), which fixes bugs QTBUG-49782 and QTBUG-48901. That commit is in 5.6 after the beta. Please upgrade to the 5.6 RC. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From u.irigoyen at gmail.com Tue Feb 23 23:28:53 2016 From: u.irigoyen at gmail.com (Unai IRIGOYEN) Date: Tue, 23 Feb 2016 23:28:53 +0100 Subject: [Interest] Qt3D SceneLoader and TechniqueFilter Message-ID: <8670415.Dmn6ztnXrf@localhost.localdomain> Hi, I import some objects into my scene via qgltf tool from project file and they are correctly rendered with Qt3D native materials (-S option) into the scene. Now, I want to add a technique to the default material effect to alter visual appearance of the objects without defining a whole new material (keeping default material parameters intact and just inject more parameters and change shaders). For this I recursively add a technique to the material effect of each entity of the loaded objects. However, the renderer (altered forward renderer) keeps using the default material despite the annotation I set on the technique (renderingStyle: myforward) and the TechniqueFilter I put on the framegraph matching the annotation. If instead of adding the technique I replace the previous ones by removing them prior to addition, the right technique is used but I lose the ability to filter to the previous technique. Now my questions are: How does TechniqueFilter process annotations in order to get the right one? What am I doing wrong? In case of multiple annotations in TechniqueFilter, do it have to match all annotations or one of the provided ones? In case of multiple annotations on Technique, does the TechniqueFilter have to match one of them or all of them? As a side note, RenderPassFilter seems to filter properly, at least with a single annotation. Thank you for your help. -- Unai IRIGOYEN From rpzrpzrpz at gmail.com Wed Feb 24 02:25:52 2016 From: rpzrpzrpz at gmail.com (mark diener) Date: Tue, 23 Feb 2016 19:25:52 -0600 Subject: [Interest] QML Keys Shock Message-ID: Hello List: I went to deploy a test app on Android and IOS that would test processing handling keys as they were entered into TextInput QML. Shockingly, the Keys.onPressed is NOT called for normal letters on either Android or IOS. Keys, like Back(delete) and Enter do trigger events, but forget about implementing PER keystroke logic on Android/IOS. Some bug tracker dialogue between Eskil Abrahamsen Blomfeldt kind of confirms this. Maybe the documentation for QML Keys should be updated to let people know that very FEW of the keys on the soft keyboard actually trigger onPressed events. Can someone tell me I am making a mistake and somehow ALL the keyboard keys like letters and space are triggered on Android and IOS soft keyboards if I only make some manifest.xml or info.plist entry! Cheers, marco From jordon.wu at gmail.com Wed Feb 24 03:27:36 2016 From: jordon.wu at gmail.com (Jordon Wu) Date: Wed, 24 Feb 2016 10:27:36 +0800 Subject: [Interest] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh? In-Reply-To: <56CC113F.4080901@theharmers.co.uk> References: <56CC113F.4080901@theharmers.co.uk> Message-ID: Hi Sean, This is a cool 3d demo(https://www.youtube.com/watch?v=zCBESbHSR1k )! Is this demo using assimp to load 3d model or using gltf to load 3d model ? BTW, Are you open this demo source code to public? Thanks Best Regards Jordon Wu 2016-02-23 15:58 GMT+08:00 Sean Harmer : > Hi, > > On 23/02/2016 07:04, Jordon Wu wrote: > > Hi list all, > > I'm begin study qt3d(qt5.5 version) now. And I want to found some examples > about 3d model mesh and sub mesh operation. > > I google found a good example QtQuick3D Tutorial - Car3D ( > http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is V1.0 and > the example did not run on qt3d 5.5 or later. > > Has anyone know where could found example about qt3d to operate 3d model > mesh and sub mesh like above Car3D examples ? Thanks > > > Well, in making of this car demo, > https://www.youtube.com/watch?v=zCBESbHSR1k we simply exported the > submeshes we needed explicit control over as separate obj files and loaded > each one usign a Mesh component aggregated to an Entity. Each Entity has > it's own Transform component that we then bind properties to QML > expressions that reference the Qt Quick Controls, e.g. slider values or > boolean switches. > > You can also have all meshes in a single OBJ file and reference the sub > mesh you wish to render in the Mesh component. We tried this but found it > to be better to split them out as it allows more work to be done in > parallel at start up, leading to faster startup times. > > Cheers, > > Sean > > > > Best Regards > > Jordon Wu > > > > _______________________________________________ > Interest mailing listInterest at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stefan.Walter at lisec.com Wed Feb 24 06:12:54 2016 From: Stefan.Walter at lisec.com (Walter Stefan) Date: Wed, 24 Feb 2016 05:12:54 +0000 Subject: [Interest] QJSEngine replacement for QScriptEngine misses newFunction In-Reply-To: <6373531.dZ2Y46ONiW@office-pc> References: <6373531.dZ2Y46ONiW@office-pc> Message-ID: <7ea8b34e567040228f606cfa1ff26744@ATSE-MAIL4.lisec.internal> Thanks Stephen! I found a solution, which is very similar to your approach. QJSValue myExt = m_engine->newQObject(new ScriptModuleMath()); // mount the whole class ScriptModule to the engine --> Math.sqrt(4) m_engine->globalObject().setProperty("Math", myExt); // mount only the sqrt function to the engine --> sqrt(4) m_engine->globalObject().setProperty("sqrt", myExt.property("sqrt")); the first mount allows me now to access the whole object and of course my sqrt() method. i.e. Math.sqrt(4); the second mount allows me to directly access the sqrt() method without the instance. i.e. sqrt(4); Thanks for your suggestion. Best Regards, Stefan -----Original Message----- From: Interest [mailto:interest-bounces+stefan.walter=lisec.com at qt-project.org] On Behalf Of Stephen Bryant Sent: Dienstag, 23. Februar 2016 15:12 To: interest at qt-project.org Subject: Re: [Interest] QJSEngine replacement for QScriptEngine misses newFunction Hi Stefan, On Tuesday 23 February 2016 05:34:03 Walter Stefan wrote: [...] > > And in this way. I can use it then in the script: > value = sqrt(4); > > I actually don't want to map a whole QObject, because that would > require a call like this: value = MyMath.sqrt(4); > > Is there any way to achive in QJSEngine the same result as I do within > the QScriptEngine? Is far as I know, the only way is to do the thing you don't want to: map the whole QObject. You can, however, add a JS function reference inside the engine so you can call the function without the object name. QJSEngine engine; engine.globalObject().setProperty( "MyMath", engine.newQObject( new ScriptModuleMath( &engine ) ) ); engine.evaluate( "var sqrt=MyMath.sqrt;" ); // repeat for other functions This will now work in JS: value = sqrt(4); You'll presumably be aware that all public slots of MyMath will automatically be available as JS functions. That makes things a little easier. It seems that you also need a QObject instance, event if you only want to expose static methods. BTW: your C++ native function can use this signature: double sqrt(double); You'll get NaN if somebody calls it with a non-number. The return value is also automatically converted as there is a QJSValue constructor that takes a double. There's no direct equivalent of read-only/undeletable, unfortunately. I'm missing that too. The closest you can get is that your MyMath functions can't be altered from JS, and you can also make a read-only Q_PROPERTY. However, there is nothing stopping somebody from reassigning properties of the global object - so your 'sqrt' function and 'MyMath' object could be replaced. This may be a security concern, depending on what you're doing. Best regards, Steve _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest From rpzrpzrpz at gmail.com Wed Feb 24 08:32:29 2016 From: rpzrpzrpz at gmail.com (mark diener) Date: Wed, 24 Feb 2016 01:32:29 -0600 Subject: [Interest] [Development] [Announce] Qt 5.6.0 RC released In-Reply-To: References: Message-ID: Hello List: Anybody running OSX El Capitan 10.11 with Qt 5.6.0 RC and IOS 9.2 and Xcode 7.2 and able to successfully debug under IOS Simulator? https://bugreports.qt.io/browse/QTCREATORBUG-15705 Any comments appreciated, md On Tue, Feb 23, 2016 at 11:41 PM, List for announcements regarding Qt releases and development wrote: > Hi all, > > > > Qt 5.6.0 RC is now released, see > http://blog.qt.io/blog/2016/02/23/qt-5-6-0-release-candidate-available/ > > > > Big thanks to everyone involved! > > > Best regards, > > Jani Heikkinen > > Release Manager | The Qt Company > > > > The Qt Company / Digia Finland Ltd, Elektroniikkatie 10, 90590 Oulu, Finland > > www.qt.io |Qt Blog: http://blog.qt.digia.com/ | Twitter: @QtbyDigia, > @Qtproject Facebook: www.facebook.com/qt > > > > > > _______________________________________________ > Announce mailing list > Announce at qt-project.org > http://lists.qt-project.org/mailman/listinfo/announce > > _______________________________________________ > Development mailing list > Development at qt-project.org > http://lists.qt-project.org/mailman/listinfo/development > From sinadooru at gmail.com Wed Feb 24 09:31:33 2016 From: sinadooru at gmail.com (Sina Dogru) Date: Wed, 24 Feb 2016 10:31:33 +0200 Subject: [Interest] QML Drag Type `dragStarted` and `dragFinished` signals Message-ID: Hello, As documentation of Drag QML Type says on `active ` property, Binding this property to the active property of MouseArea::drag > will cause > startDrag > to be called when the user starts dragging. And same documentation also says on `dragStarted ` signal, This signal is emitted when a drag is started with the startDrag() > method or > when it is started automatically using the dragType > > property. > So according to those, what I do understand is, Rectangle { id: rect width: 20; height: 20 color: "red" Drag.active: mouseArea.drag.active Drag.onDragStarted: console.log("dragStarted"); MouseArea { id: mouseArea anchors.fill: parent drag.target: parent onReleased: parent.Drag.drop(); } } the code above should write "dragStarted" on the console when I move the rect, but this does not happen. Does anyone know the right way? Thank you, Cavit Sina -------------- next part -------------- An HTML attachment was scrubbed... URL: From lykurg at gmail.com Wed Feb 24 09:39:39 2016 From: lykurg at gmail.com (Lorenz Haas) Date: Wed, 24 Feb 2016 09:39:39 +0100 Subject: [Interest] moveToThread used in constructor to move "this" Message-ID: Hi, keep calm, it is not about moveToThread(this) :) One canonical way to use QObjects and QThreads is this void SomeClass::init() { // m_thread is a member of SomeClass Foo *foo = new Foo; // Foo inherits QObject foo->moveToThread(&m_thread); } So in my case I want that an instance of Foo is always moved to a (single) thread. In order to take this knowledge/requirement - as well as the boilerplate code - from the caller (here SomeClass::init) I am curious if this is would be a valid substitution: Foo::Foo() : QObject(nullptr) { // m_thread is now a member of Foo moveToThread(&m_thread); } void SomeClass::init() { Foo *foo = new Foo; } I guess that in the constructor of Foo the base class QObject is already instantiated and since moveToThread only has implications on QObject it should be right. Can any one with deeper QThread insight confirm that using moveToThread in a constructor like above is safe? Thanks, Lorenz From andre at familiesomers.nl Wed Feb 24 10:01:01 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Wed, 24 Feb 2016 10:01:01 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: Message-ID: <56CD714D.6090705@familiesomers.nl> Op 24/02/2016 om 09:39 schreef Lorenz Haas: > Hi, > > keep calm, it is not about moveToThread(this) :) > > One canonical way to use QObjects and QThreads is this > > void SomeClass::init() { > // m_thread is a member of SomeClass > Foo *foo = new Foo; // Foo inherits QObject > foo->moveToThread(&m_thread); > } > > So in my case I want that an instance of Foo is always moved to a > (single) thread. In order to take this knowledge/requirement - as well > as the boilerplate code - from the caller (here SomeClass::init) I am > curious if this is would be a valid substitution: > > Foo::Foo() : QObject(nullptr) { > // m_thread is now a member of Foo > moveToThread(&m_thread); > } > > void SomeClass::init() { > Foo *foo = new Foo; > } > > > I guess that in the constructor of Foo the base class QObject is > already instantiated and since moveToThread only has implications on > QObject it should be right. > Can any one with deeper QThread insight confirm that using > moveToThread in a constructor like above is safe? > That should work just fine, with the exception of using &m_thread as a member. If you want to use the class as you write it above, then there is no way to set that member. You will probably need to use some form of a static here, either inside the class itself if you don't need control over the actual thread creation itself, or externally, perhaps wrapped in some kind of singleton. André From lykurg at gmail.com Wed Feb 24 10:22:18 2016 From: lykurg at gmail.com (Lorenz Haas) Date: Wed, 24 Feb 2016 10:22:18 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <56CD714D.6090705@familiesomers.nl> References: <56CD714D.6090705@familiesomers.nl> Message-ID: Hi André, > That should work just fine, with the exception of using &m_thread as a > member. thanks for your answer. I am, however, not sure what you mean regarding the m_thread member. For a better understanding here is a working example I have in mind: ************************************************** #include class Foo : public QObject { Q_OBJECT public: Foo() : QObject(nullptr) { moveToThread(&m_thread); m_thread.start(); } ~Foo() { m_thread.quit(); m_thread.wait(); } void printFooInformation() const { qDebug() << "foo affinity" << thread(); } void printThreadInformation() const { qDebug() << "m_thread affinity" << m_thread.thread(); } private: QThread m_thread; }; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); qDebug() << "GUI affinity" << a.thread(); Foo *foo = new Foo; foo->printThreadInformation(); foo->printFooInformation(); return a.exec(); } #include "main.moc" ************************************************** Of course, every instance of Foo would create a new thread and therefor multiple instance of Foo would _not_ share the same thread. Did you mean that? (In my special case this is intended.) Lorenz From huang_yi at cdv.com Wed Feb 24 10:32:22 2016 From: huang_yi at cdv.com (=?utf-8?B?6buE6KOU?=) Date: Wed, 24 Feb 2016 17:32:22 +0800 Subject: [Interest] How to hide keyboard while clicking outside of keyboard in qml Message-ID: I use TextArea as input in qml file. When clicking TextArea, keyboard pops up. But the keyboard could not hide while clicking outside of it. Whether there is a method or any API in qml can resolve this problem conveniently? thanks. Yi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmaxera at gmail.com Wed Feb 24 10:35:33 2016 From: gmaxera at gmail.com (Gian Maxera) Date: Wed, 24 Feb 2016 09:35:33 +0000 Subject: [Interest] How to hide keyboard while clicking outside of keyboard in qml In-Reply-To: References: Message-ID: <70B75D97-9044-4398-9916-8953E41403F7@gmail.com> Hello, I do in this way: - add a MouseArea covering the entire screen that got a z level lower than any other input area (like TextArea) - on the onClicked I just call: Qt.inputMethod.hide() and the keyboard will close is you click outside any other active elements. Ciao, Gianluca. > On 24 Feb 2016, at 09:32, 黄裔 wrote: > > I use TextArea as input in qml file. When clicking TextArea, keyboard pops up. But the keyboard could not hide while clicking outside of it. Whether there is a method or any API in qml can resolve this problem conveniently? > > thanks. > Yi > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From andre at familiesomers.nl Wed Feb 24 11:47:06 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Wed, 24 Feb 2016 11:47:06 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: <56CD714D.6090705@familiesomers.nl> Message-ID: <56CD8A2A.4020409@familiesomers.nl> Op 24/02/2016 om 10:22 schreef Lorenz Haas: > Hi André, > >> That should work just fine, with the exception of using &m_thread as a >> member. > thanks for your answer. I am, however, not sure what you mean > regarding the m_thread member. For a better understanding here is a > working example I have in mind: Ah, so you want a per-object thread. I guess your design is possible. I'm not sure it is a good idea though. Depending on what API you expose, you will have to assume that the methods called on your class are called from another thread. Or, worse, the caller needs to be aware of that. That gets ugly quite fast if the things you want to expose are not as trivial as your example below... André > > ************************************************** > #include > > class Foo : public QObject > { > Q_OBJECT > public: > Foo() : QObject(nullptr) { > moveToThread(&m_thread); > m_thread.start(); > } > > ~Foo() { > m_thread.quit(); > m_thread.wait(); > } > > void printFooInformation() const { > qDebug() << "foo affinity" << thread(); > } > > void printThreadInformation() const { > qDebug() << "m_thread affinity" << m_thread.thread(); > } > > private: > QThread m_thread; > }; > > int main(int argc, char *argv[]) > { > QCoreApplication a(argc, argv); > qDebug() << "GUI affinity" << a.thread(); > Foo *foo = new Foo; > foo->printThreadInformation(); > foo->printFooInformation(); > return a.exec(); > } > > #include "main.moc" > ************************************************** > > Of course, every instance of Foo would create a new thread and > therefor multiple instance of Foo would _not_ share the same thread. > Did you mean that? (In my special case this is intended.) > > Lorenz From pr12og2 at programist.ru Wed Feb 24 12:50:02 2016 From: pr12og2 at programist.ru (Prav) Date: Wed, 24 Feb 2016 14:50:02 +0300 Subject: [Interest] Tempalted QObjects In-Reply-To: <1570413.VTGT6AmsgO@tjmaciei-mobl4> References: <1570413.VTGT6AmsgO@tjmaciei-mobl4> Message-ID: <768806465.20160224145002@programist.ru> >> "For example, I implemented support for templated QObjects in moc >> , but this was not merged because >> it did not raise enough interest within the Qt project." > Not even that. > The required condition is that someone figure out how to provide a meta object > to template classes. The current solution would require installing the file > generated by moc, #include'ing it from your class's header file, and modifying > the internal format heavily (i.e., a Qt 6.0 task). > This is unlikely to change in the current C++ language. If you want templated > QObjects, please join SG7 discussion group in isocpp.org and help define > reflection for C++. Then hopefully Qt will be able to use this feature in the > early 2020s. Thiago's and Jean-Michaël's statements looks contradictary for me. This is because https://codereview.qt-project.org/49864/ does not work or what? From rpzrpzrpz at gmail.com Wed Feb 24 14:45:20 2016 From: rpzrpzrpz at gmail.com (mark diener) Date: Wed, 24 Feb 2016 07:45:20 -0600 Subject: [Interest] How to hide keyboard while clicking outside of keyboard in qml In-Reply-To: <70B75D97-9044-4398-9916-8953E41403F7@gmail.com> References: <70B75D97-9044-4398-9916-8953E41403F7@gmail.com> Message-ID: Gianluca: For simple QML layouts, I think your technique would work. But I found that mousearea had issues when you had Loader objects in the chain. Another approach is to use a Q_INVOKABLE function to register any QML object that you want to have the keyboard hide whenever the touch outside of the registered QML Edit object. I generally call this register function for edit controls when they gain focus and use a common edit control classname like "MyEdit" Then in the overridden Application::eventproc(...), I look for QEvent::TouchBegin or QEvent::MouseButtonPress event. Then I use the incoming message's object metaObject() and parent() to scan up the parent chain to look for a object class name that matches my QML class name "MyEdit" Example: String(gobj->ClassName()).contains("MyEdit",Qt::CaseInsensitive") == true If I cannot find a match, I set the "focus" property of the registered object "false". You can also NOT hide the keyboard if the incoming mouse/touch message is related to an object that is another "MyEdit" class. I built this into a general library so now I don't even think about it, I get fully functional soft keyboard hiding across all my apps and it works. Cheers, md On Wed, Feb 24, 2016 at 3:35 AM, Gian Maxera wrote: > Hello, > I do in this way: > - add a MouseArea covering the entire screen that got a z level lower than any other input area (like TextArea) > - on the onClicked I just call: Qt.inputMethod.hide() and the keyboard will close is you click outside any other active elements. > > Ciao, > Gianluca. > > >> On 24 Feb 2016, at 09:32, 黄裔 wrote: >> >> I use TextArea as input in qml file. When clicking TextArea, keyboard pops up. But the keyboard could not hide while clicking outside of it. Whether there is a method or any API in qml can resolve this problem conveniently? >> >> thanks. >> Yi >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From jhihn at gmx.com Wed Feb 24 17:17:49 2016 From: jhihn at gmx.com (Jason H) Date: Wed, 24 Feb 2016 17:17:49 +0100 Subject: [Interest] emitting signals from UIApplication app delegate? Message-ID: I want a QObject class to emit a signal when a function in my app delegate is invoked. (Code follows) How can I do that? I don't know how to use QObjects in ObjectiveC --- PlatformShimImpl.cpp PlatformShimImpl::PlatformShimImpl(){ qDebug() << Q_FUNC_INFO; QtAppDelegate *appDelegate = (QtAppDelegate *)[[UIApplication sharedApplication] delegate]; [[UIApplication sharedApplication] setDelegate:[QtAppDelegate sharedQtAppDelegate]]; //[[QtAppDelegate sharedQtAppDelegate] setWindow:appDelegate.window]; } --- QtAppDelegate.mm - (void)applicationWillResignActive:(UIApplication *)application { [application setIdleTimerDisabled:NO]; // emit resignActive() } Many thanks. From nunosantos at imaginando.pt Wed Feb 24 17:37:07 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 24 Feb 2016 16:37:07 +0000 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command Message-ID: <56CDDC33.4060604@imaginando.pt> Hi, Can't build Qt 5.6 RC with the very same command I have been using since Qt 5.6 alpha. Does anyone knows why? Is not being able to find configure.exe. Is it supposed to be included? This is the output: C:\Qt\5.6\src_32>configure.bat -prefix c:\qt\5.6\msvc2013_5_6_rc_32_static -commercial -debug-and-release -static -nomake examples -nomake tools -nomake tests -opengl dynamic -skip multimedia + cd qtbase + C:\Qt\5.6\src_32\qtbase\configure.bat -top-level -prefix c:\qt\5.6\msvc2013_opengl_5_6_rc_32_static -commercial -debug-and-release -static -nomake examples -nomake tools -nomake tests -opengl dynamic -skip multimedia -openssl-linked -I c:\openssl-lib\include -L c:\openssl-lib\lib OPENSSL_LIBS_DEBUG="ssleay32MTd.lib libeay32MTd.lib" OPENSSL_LIBS_RELEASE="ssleay32MT.lib libeay32MT.lib" -qtnamespace com_imaginando_drc 'C:\Qt\5.6\src_32\qtbase\configure.exe' is not recognized as an internal or external command, operable program or batch file. Thanks, Nuno From nunosantos at imaginando.pt Wed Feb 24 17:38:30 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Wed, 24 Feb 2016 16:38:30 +0000 Subject: [Interest] emitting signals from UIApplication app delegate? In-Reply-To: References: Message-ID: <56CDDC86.6040100@imaginando.pt> Jason, A signal is a function. You just need to call it. But first you need to have a valid object to call it. Nuno Em 24/02/2016 16:17, Jason H escreveu: > I want a QObject class to emit a signal when a function in my app delegate is invoked. (Code follows) How can I do that? I don't know how to use QObjects in ObjectiveC > > --- PlatformShimImpl.cpp > PlatformShimImpl::PlatformShimImpl(){ > qDebug() << Q_FUNC_INFO; > QtAppDelegate *appDelegate = (QtAppDelegate *)[[UIApplication sharedApplication] delegate]; > [[UIApplication sharedApplication] setDelegate:[QtAppDelegate sharedQtAppDelegate]]; > //[[QtAppDelegate sharedQtAppDelegate] setWindow:appDelegate.window]; > } > > > --- QtAppDelegate.mm > - (void)applicationWillResignActive:(UIApplication *)application > { > [application setIdleTimerDisabled:NO]; > // emit resignActive() > } > > > Many thanks. > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From philwave at gmail.com Wed Feb 24 18:11:54 2016 From: philwave at gmail.com (Philippe) Date: Wed, 24 Feb 2016 18:11:54 +0100 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command In-Reply-To: <56CDDC33.4060604@imaginando.pt> References: <56CDDC33.4060604@imaginando.pt> Message-ID: <20160224181152.8760.6F0322A@gmail.com> Same her, impossible to build fully under Windows 10 / VS 2015 (I tried both 32 and 64 bit). qtBase builds fine, but later ActiveX and XMLPatterns projects fail. I tried with a basic configuration: configure -debug-and-release -make-tool jom -commercial -confirm-license Philippe Here, even with the most default :: configure -debug-and-release -make-tool jom -commercial -confirm-license On Wed, 24 Feb 2016 16:37:07 +0000 Nuno Santos wrote: > Hi, > > Can't build Qt 5.6 RC with the very same command I have been using since Qt 5.6 alpha. Does anyone knows why? > > Is not being able to find configure.exe. Is it supposed to be included? > > This is the output: > > C:\Qt\5.6\src_32>configure.bat -prefix c:\qt\5.6\msvc2013_5_6_rc_32_static -commercial -debug-and-release -static -nomake examples -nomake tools -nomake tests -opengl dynamic -skip multimedia > > + cd qtbase > + C:\Qt\5.6\src_32\qtbase\configure.bat -top-level -prefix c:\qt\5.6\msvc2013_opengl_5_6_rc_32_static -commercial -debug-and-release -static -nomake examples -nomake tools -nomake tests -opengl dynamic -skip multimedia -openssl-linked -I c:\openssl-lib\include -L c:\openssl-lib\lib OPENSSL_LIBS_DEBUG="ssleay32MTd.lib libeay32MTd.lib" OPENSSL_LIBS_RELEASE="ssleay32MT.lib libeay32MT.lib" -qtnamespace com_imaginando_drc > 'C:\Qt\5.6\src_32\qtbase\configure.exe' is not recognized as an internal or external command, > operable program or batch file. > > Thanks, > > Nuno > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From thiago.macieira at intel.com Wed Feb 24 18:23:11 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 09:23:11 -0800 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: <56CD714D.6090705@familiesomers.nl> Message-ID: <4443012.g9HY62BKSb@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 10:22:18 PST Lorenz Haas wrote: > Foo() : QObject(nullptr) { > moveToThread(&m_thread); > m_thread.start(); > } > > ~Foo() { > m_thread.quit(); > m_thread.wait(); > } This destructor is either never run or deadlocks. A QObject can only be destroyed in its thread of affinity. So the above is running in that m_thread thread, which means it hasn't exited. Waiting for it to exit will wait forever. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Wed Feb 24 18:25:10 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 09:25:10 -0800 Subject: [Interest] Tempalted QObjects In-Reply-To: <768806465.20160224145002@programist.ru> References: <1570413.VTGT6AmsgO@tjmaciei-mobl4> <768806465.20160224145002@programist.ru> Message-ID: <8883057.tLkAicmbxD@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 14:50:02 PST Prav wrote: > >> "For example, I implemented support for templated QObjects in moc > >> , but this was not merged > >> because > >> it did not raise enough interest within the Qt project." > > > > Not even that. > > The required condition is that someone figure out how to provide a meta > > object to template classes. The current solution would require installing > > the file generated by moc, #include'ing it from your class's header file, > > and modifying the internal format heavily (i.e., a Qt 6.0 task). > > > > This is unlikely to change in the current C++ language. If you want > > templated QObjects, please join SG7 discussion group in isocpp.org and > > help define reflection for C++. Then hopefully Qt will be able to use > > this feature in the early 2020s. > > Thiago's and Jean-Michaël's statements looks contradictary for me. > This is because https://codereview.qt-project.org/49864/ does not work or > what? It works, but is not acceptable. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From jeanmichael.celerier at gmail.com Wed Feb 24 20:13:44 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Wed, 24 Feb 2016 20:13:44 +0100 Subject: [Interest] Tempalted QObjects In-Reply-To: <8883057.tLkAicmbxD@tjmaciei-mobl4> References: <1570413.VTGT6AmsgO@tjmaciei-mobl4> <768806465.20160224145002@programist.ru> <8883057.tLkAicmbxD@tjmaciei-mobl4> Message-ID: I saw some other approaches to produce static reflection information by libclang usage, would inspired approaches be acceptable ? e.g. https://github.com/AustinBrunkhorst/CPP-Reflection/ Also, why is "#include'ing it from your class's header file," considered bad ? In "standard" Qt software, it is sometimes useful to #include "foo_moc.cpp" (or foo.moc, I don't remember) in the implementation file, for instance if multiple classes are defined in the same header IIRC. But when doing template-heavy software the .hpp have more or less the same role for the developer that "traditional" implementation files so it should not come as shocking to require inclusion of files in the .hpp. But it's only my personal opinion. Best, Jean-Michaël On Wed, Feb 24, 2016 at 6:25 PM, Thiago Macieira wrote: > On quarta-feira, 24 de fevereiro de 2016 14:50:02 PST Prav wrote: > > >> "For example, I implemented support for templated QObjects in moc > > >> , but this was not merged > > >> because > > >> it did not raise enough interest within the Qt project." > > > > > > Not even that. > > > The required condition is that someone figure out how to provide a meta > > > object to template classes. The current solution would require > installing > > > the file generated by moc, #include'ing it from your class's header > file, > > > and modifying the internal format heavily (i.e., a Qt 6.0 task). > > > > > > This is unlikely to change in the current C++ language. If you want > > > templated QObjects, please join SG7 discussion group in isocpp.org and > > > help define reflection for C++. Then hopefully Qt will be able to use > > > this feature in the early 2020s. > > > > Thiago's and Jean-Michaël's statements looks contradictary for me. > > This is because https://codereview.qt-project.org/49864/ does not work > or > > what? > > It works, but is not acceptable. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sh at theharmers.co.uk Wed Feb 24 20:25:09 2016 From: sh at theharmers.co.uk (Sean Harmer) Date: Wed, 24 Feb 2016 19:25:09 +0000 Subject: [Interest] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh? In-Reply-To: References: <56CC113F.4080901@theharmers.co.uk> Message-ID: <56CE0395.3020300@theharmers.co.uk> Hi Jordan, On 24/02/2016 02:27, Jordon Wu wrote: > Hi Sean, > > This is a cool 3d demo(https://www.youtube.com/watch?v=zCBESbHSR1k)! > > Is this demo using assimp to load 3d model or using gltf to load 3d > model ? Nope, each sub mesh is in it's own OBJ file which we load using the Mesh component. So in essence what we have is a scene graph hierarchy of RenderEntity's which look something like this: Entity { id: root property alias translation: transform.translation property real scale: transform.scale property Mesh mesh property Material material property Layer layer Transform { id: transform translation: Qt.vector3d(x, y, z) } components: [ mesh, material, transform, layer ] } And then when we instantiate them they look like: // LEFT DOOR RenderEntity { mesh: leftDoor material: materials.doorPaint layer: carLayer y: 0.5 * root.explodeProgress x: 1 * root.explodeProgress RenderEntity { mesh: leftDoorGlass material: materials.window layer: carLayer } RenderEntity { mesh: leftDoorHinge material: materials.darkPlastic layer: carLayer } RenderEntity { mesh: leftDoorMirror material: materials.trim layer: carLayer } RenderEntity { mesh: leftDoorOpener material: materials.aluminium layer: carLayer } RenderEntity { mesh: leftDoorInnerLower material: materials.salonDevicesPlate layer: carLayer } RenderEntity { mesh: leftDoorInnerUpper material: materials.salonMaterial layer: carLayer } } where for e.g. mesh: leftDoor just refers to a Mesh property elsewhere in the scope. > > BTW, Are you open this demo source code to public? Thanks I can't publish it just yet as we can't distribute the model itself so I need to strip that out. Hopefully soon though. Sean > > Best Regards > Jordon Wu > > 2016-02-23 15:58 GMT+08:00 Sean Harmer >: > > Hi, > > On 23/02/2016 07:04, Jordon Wu wrote: >> Hi list all, >> >> I'm begin study qt3d(qt5.5 version) now. And I want to found some >> examples about 3d model mesh and sub mesh operation. >> >> I google found a good example QtQuick3D Tutorial - Car3D ( >> http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is >> V1.0 and the example did not run on qt3d 5.5 or later. >> >> Has anyone know where could found example about qt3d to operate >> 3d model mesh and sub mesh like above Car3D examples ? Thanks > > Well, in making of this car demo, > https://www.youtube.com/watch?v=zCBESbHSR1k we simply exported the > submeshes we needed explicit control over as separate obj files > and loaded each one usign a Mesh component aggregated to an > Entity. Each Entity has it's own Transform component that we then > bind properties to QML expressions that reference the Qt Quick > Controls, e.g. slider values or boolean switches. > > You can also have all meshes in a single OBJ file and reference > the sub mesh you wish to render in the Mesh component. We tried > this but found it to be better to split them out as it allows more > work to be done in parallel at start up, leading to faster startup > times. > > Cheers, > > Sean > >> >> >> Best Regards >> >> Jordon Wu >> >> >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Wed Feb 24 20:39:22 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 11:39:22 -0800 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command In-Reply-To: <56CDDC33.4060604@imaginando.pt> References: <56CDDC33.4060604@imaginando.pt> Message-ID: <2522592.f3rmoW16sW@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 16:37:07 PST Nuno Santos wrote: > Can't build Qt 5.6 RC with the very same command I have been using since > Qt 5.6 alpha. Does anyone knows why? I see configure.exe in qtbase-opensource-5.6.0-rc.zip, but it's missing in all the other packages. I've risen the priority of https://bugreports.qt.io/browse/QTBUG-35314 to P1 for the final release. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Wed Feb 24 20:39:53 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 11:39:53 -0800 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command In-Reply-To: <20160224181152.8760.6F0322A@gmail.com> References: <56CDDC33.4060604@imaginando.pt> <20160224181152.8760.6F0322A@gmail.com> Message-ID: <13872899.3xAYUxBU6Q@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 18:11:54 PST Philippe wrote: > qtBase builds fine, but later ActiveX and XMLPatterns projects fail. Please report those issues. Obviously, they compiled for us. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From philwave at gmail.com Wed Feb 24 20:48:49 2016 From: philwave at gmail.com (Philippe) Date: Wed, 24 Feb 2016 20:48:49 +0100 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command In-Reply-To: <2522592.f3rmoW16sW@tjmaciei-mobl4> References: <56CDDC33.4060604@imaginando.pt> <2522592.f3rmoW16sW@tjmaciei-mobl4> Message-ID: <20160224204848.D820.6F0322A@gmail.com> >>I see configure.exe in qtbase-opensource-5.6.0-rc.zip, but it's missing >>in all the other packages. It is not present in the commercial zip package. But configure.exe is built by configure.bat and this works ok. The problem I encounter is something else. Philippe On Wed, 24 Feb 2016 11:39:22 -0800 Thiago Macieira wrote: > On quarta-feira, 24 de fevereiro de 2016 16:37:07 PST Nuno Santos wrote: > > Can't build Qt 5.6 RC with the very same command I have been using since > > Qt 5.6 alpha. Does anyone knows why? > > I see configure.exe in qtbase-opensource-5.6.0-rc.zip, but it's missing in all > the other packages. > > I've risen the priority of https://bugreports.qt.io/browse/QTBUG-35314 to P1 > for the final release. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From thiago.macieira at intel.com Wed Feb 24 20:50:15 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 11:50:15 -0800 Subject: [Interest] Tempalted QObjects In-Reply-To: References: <8883057.tLkAicmbxD@tjmaciei-mobl4> Message-ID: <2969044.NipsUxm9n9@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 20:13:44 PST Jean-Michaël Celerier wrote: > I saw some other approaches to produce static reflection information by > libclang usage, > would inspired approaches be acceptable ? e.g. > https://github.com/AustinBrunkhorst/CPP-Reflection/ > > Also, why is "#include'ing it from your class's header file," considered > bad ? Because it means that you need to install the Moc output as a header file for ALL of your users to include. The output isn't meant for that, as it has an #if check that you're compiling against the QtCore headers which came along with the moc that created that output. It also declares functions and variables that aren't properly namespaced for headers, and it declares static variables that would end up in every since translation unit that #included the output. And that's just what we can fix, with some work. > In "standard" Qt software, it is sometimes useful to #include > "foo_moc.cpp" (or foo.moc, I don't remember) > in the implementation file, for instance if multiple classes are defined in > the same header IIRC. Right, but you're including it from the .cpp and you never distribute that moc_foo.cpp file. We're talking about including it from a header and distributing that with your software so your users include it too (indirectly). > But when doing template-heavy software the .hpp have more or less the same > role > for the developer that "traditional" implementation files so it should not > come as shocking to require > inclusion of files in the .hpp. But it's only my personal opinion. We find that poor coding practice. All-inline template code leads to template bloat because the no compilers is currently able to merge implementations that produce the same code, if they come from different functions. Qt takes care to fall back to a common implementation, often non-inline, for its template classes whenever it can. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Wed Feb 24 20:52:16 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 11:52:16 -0800 Subject: [Interest] Can't build Qt 5.6 RC on Windows - configure.exe is not recognized as internal or external command In-Reply-To: <20160224204848.D820.6F0322A@gmail.com> References: <56CDDC33.4060604@imaginando.pt> <2522592.f3rmoW16sW@tjmaciei-mobl4> <20160224204848.D820.6F0322A@gmail.com> Message-ID: <13872906.MVaSGHcYb0@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 20:48:49 PST Philippe wrote: > But configure.exe is built by configure.bat and this works ok. > > The problem I encounter is something else. Only if the .gitignore file is present. You can create it (empty is fine) to force configure.bat compiling the configure.exe application. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From norulez at me.com Wed Feb 24 22:09:21 2016 From: norulez at me.com (NoRulez) Date: Wed, 24 Feb 2016 22:09:21 +0100 Subject: [Interest] How can I set proxy settings and QNetworkCookieJar with QWebEngine In-Reply-To: References: <8F41253C-9EA9-4D23-86C6-C7CD671A9179@me.com> Message-ID: Ok i think the most is solved in Qt 5.6.0 rc. Thanks Am 22.02.2016 um 11:08 schrieb Koehne Kai : >> -----Original Message----- >> From: NoRulez [mailto:norulez at me.com] >> [...] >>> Could you elaborate? >> >> >> In the Qt 5.5 examples there are a CookieJar example with QWebEngine. But >> in the Qt 5.6 beta this example and functions are removed. See for example: >> http://doc.qt.io/qt-5/qtwebenginewidgets-browser-cookiejar-cpp.html > > It got only renamed: http://doc-snapshots.qt.io/qt5-5.7/qtwebengine-webenginewidgets-demobrowser-cookiejar-cpp.html > > But we btw now also added an explicit example for the new cookie API: > > http://doc-snapshots.qt.io/qt5-5.7/qtwebengine-webenginewidgets-cookiebrowser-example.html > > Regards > > Kai From lykurg at gmail.com Wed Feb 24 22:20:49 2016 From: lykurg at gmail.com (Lorenz Haas) Date: Wed, 24 Feb 2016 22:20:49 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <4443012.g9HY62BKSb@tjmaciei-mobl4> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> Message-ID: <56CE1EB1.1040603@gmail.com> > This destructor is either never run or deadlocks. Indeed, my example/test code was bad. The destructor was never called and thus I haven't saw the error output. > A QObject can only be destroyed in its thread of affinity. So the above is > running in that m_thread thread, which means it hasn't exited. Waiting for it > to exit will wait forever. Thanks for spotting this issue and pointing it out. The "self managing class" was so tempting ... but it's not working :( Thanks for your help. Lorenz From jeanmichael.celerier at gmail.com Wed Feb 24 22:28:23 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Wed, 24 Feb 2016 22:28:23 +0100 Subject: [Interest] Tempalted QObjects In-Reply-To: <2969044.NipsUxm9n9@tjmaciei-mobl4> References: <8883057.tLkAicmbxD@tjmaciei-mobl4> <2969044.NipsUxm9n9@tjmaciei-mobl4> Message-ID: On Wed, Feb 24, 2016 at 8:50 PM, Thiago Macieira wrote: > no compilers is currently able to merge implementations that > produce the same code, if they come from different functions. > Isn't this what MSVC's /OPT:ICF ( https://msdn.microsoft.com/en-us/library/bxwfs976%28v=vs.140%29.aspx) and gcc's -ffunction-sections -fdata-sections --gc-sections or gold's --icf : https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01499.html do ? (although maybe not with a 100% hit rate). A quick research has shown that clang contains a "mergefunc" option but it does not seem to be production-quality. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhihn at gmx.com Wed Feb 24 23:41:51 2016 From: jhihn at gmx.com (Jason H) Date: Wed, 24 Feb 2016 23:41:51 +0100 Subject: [Interest] Android Studio and Qt Message-ID: There is a step missing in http://www.kdab.com/qt-android-episode-6/ Where we go from importing the build.gradle to somehow having Java source to start debugging. Can someone fill in the missing steps? I didn't find any .java files. From md at rpzdesign.com Wed Feb 24 23:59:32 2016 From: md at rpzdesign.com (md at rpzdesign.com) Date: Wed, 24 Feb 2016 16:59:32 -0600 Subject: [Interest] Android Studio and Qt In-Reply-To: References: Message-ID: <56CE35D4.5060809@rpzdesign.com> Jason: Its a little tricky, I think you have to open up the created project in the build directory, not try to import from the source directory tree where the qmake pro file is located. Look at Build Settings -> Build Steps -> Make: main in /bla/bla/bla directory and find the Debug -> android-build directory and magically inside this directory is another gradle file. Import from that build location and Android Studio will come up and be able to process the java files while the compiled so C++ files are loaded but not able to step into them as a native library. That help? md On 2/24/2016 4:41 PM, Jason H wrote: > There is a step missing in http://www.kdab.com/qt-android-episode-6/ > Where we go from importing the build.gradle to somehow having Java source to start debugging. > > Can someone fill in the missing steps? > I didn't find any .java files. > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > From thiago.macieira at intel.com Thu Feb 25 00:23:46 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Wed, 24 Feb 2016 15:23:46 -0800 Subject: [Interest] Tempalted QObjects In-Reply-To: References: <2969044.NipsUxm9n9@tjmaciei-mobl4> Message-ID: <2329415.kLHpIluJcm@tjmaciei-mobl4> On quarta-feira, 24 de fevereiro de 2016 22:28:23 PST Jean-Michaël Celerier wrote: > On Wed, Feb 24, 2016 at 8:50 PM, Thiago Macieira > wrote: > > no compilers is currently able to merge implementations that > > produce the same code, if they come from different functions. > > Isn't this what MSVC's /OPT:ICF ( > https://msdn.microsoft.com/en-us/library/bxwfs976%28v=vs.140%29.aspx) I've never seen that before. I'll need to take a better look. > and gcc's -ffunction-sections -fdata-sections --gc-sections No. > or gold's --icf Kinda. As the link you pointed out: > https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01499.html Says, a compiler-based ICF is more efficient than a linker-based ICF. The linker can only do ICF if you've compiled with -ffunction-sections and can only do it at function granularity. The compiler can do better. > > do ? (although maybe not with a 100% hit rate). > > A quick research has shown that clang contains a "mergefunc" option but it > does not seem to be production-quality. It looks like the GCC option -fipa-icf is already enabled at -O2 level and has been for some time. That is good, but given that I am still seeing duplicate code where strict analysis says it isn't needed, it means there's still a long way to go for the compilers to do the heavy-lifting. Helping the compiler is still necessary. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From jhihn at gmx.com Thu Feb 25 01:41:01 2016 From: jhihn at gmx.com (Jason H) Date: Thu, 25 Feb 2016 01:41:01 +0100 Subject: [Interest] Android Studio and Qt In-Reply-To: <56CE35D4.5060809@rpzdesign.com> References: , <56CE35D4.5060809@rpzdesign.com> Message-ID: Hrm, that's not what the instructions said, but I can see your point. If correct though, I'd be usin the Qt-supplied/generated classes, but that means I'm editing code in the build dir? Shouldn't the code be under my project's android dir? The article alludes to a projdir/android/src/com/company/... directory. > Sent: Wednesday, February 24, 2016 at 5:59 PM > From: "md at rpzdesign.com" > To: interest at qt-project.org > Subject: Re: [Interest] Android Studio and Qt > > Jason: > > Its a little tricky, I think you have to open up the created project in > the build directory, not try to import from the source directory tree > where the qmake pro file is located. > > Look at Build Settings -> Build Steps -> Make: main in /bla/bla/bla > directory and find the Debug -> android-build directory and magically > inside this directory is another gradle file. > > Import from that build location and Android Studio will come up and be > able to process the java files while the compiled so C++ files are > loaded but not able to step into them as a native library. > > That help? > > md > > On 2/24/2016 4:41 PM, Jason H wrote: > > There is a step missing in http://www.kdab.com/qt-android-episode-6/ > > Where we go from importing the build.gradle to somehow having Java source to start debugging. > > > > Can someone fill in the missing steps? > > I didn't find any .java files. > > _______________________________________________ > > Interest mailing list > > Interest at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/interest > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > From jordon.wu at gmail.com Thu Feb 25 02:07:26 2016 From: jordon.wu at gmail.com (Jordon Wu) Date: Thu, 25 Feb 2016 09:07:26 +0800 Subject: [Interest] Has some examples about new version qt3d (5.5 or later) to operate 3d model mesh and sub mesh? In-Reply-To: <56CE0395.3020300@theharmers.co.uk> References: <56CC113F.4080901@theharmers.co.uk> <56CE0395.3020300@theharmers.co.uk> Message-ID: Hi Sean, Thanks very much. I will try is later. Best Regards Jordon Wu 2016-02-25 3:25 GMT+08:00 Sean Harmer : > Hi Jordan, > > On 24/02/2016 02:27, Jordon Wu wrote: > > Hi Sean, > > This is a cool 3d demo(https://www.youtube.com/watch?v=zCBESbHSR1k )! > > Is this demo using assimp to load 3d model or using gltf to load 3d model ? > > > Nope, each sub mesh is in it's own OBJ file which we load using the Mesh > component. So in essence what we have is a scene graph hierarchy of > RenderEntity's which look something like this: > > Entity { > id: root > > property alias translation: transform.translation > property real scale: transform.scale > property Mesh mesh > property Material material > property Layer layer > > Transform { > id: transform > translation: Qt.vector3d(x, y, z) > } > > components: [ > mesh, > material, > transform, > layer > ] > } > > And then when we instantiate them they look like: > > // LEFT DOOR > RenderEntity { > mesh: leftDoor > material: materials.doorPaint > layer: carLayer > y: 0.5 * root.explodeProgress > x: 1 * root.explodeProgress > > RenderEntity { > mesh: leftDoorGlass > material: materials.window > layer: carLayer > } > > RenderEntity { > mesh: leftDoorHinge > material: materials.darkPlastic > layer: carLayer > } > RenderEntity { > mesh: leftDoorMirror > material: materials.trim > layer: carLayer > } > > RenderEntity { > mesh: leftDoorOpener > material: materials.aluminium > layer: carLayer > } > > RenderEntity { > mesh: leftDoorInnerLower > material: materials.salonDevicesPlate > layer: carLayer > } > > RenderEntity { > mesh: leftDoorInnerUpper > material: materials.salonMaterial > layer: carLayer > } > } > > where for e.g. mesh: leftDoor just refers to a Mesh property elsewhere in > the scope. > > > BTW, Are you open this demo source code to public? Thanks > > > I can't publish it just yet as we can't distribute the model itself so I > need to strip that out. Hopefully soon though. > > Sean > > > Best Regards > Jordon Wu > > 2016-02-23 15:58 GMT+08:00 Sean Harmer : > >> Hi, >> >> On 23/02/2016 07:04, Jordon Wu wrote: >> >> Hi list all, >> >> I'm begin study qt3d(qt5.5 version) now. And I want to found some >> examples about 3d model mesh and sub mesh operation. >> >> I google found a good example QtQuick3D Tutorial - Car3D ( >> http://www.youtube.com/watch?v=VvQ_NHKtHwE ), but this qt3d is V1.0 and >> the example did not run on qt3d 5.5 or later. >> >> Has anyone know where could found example about qt3d to operate 3d model >> mesh and sub mesh like above Car3D examples ? Thanks >> >> >> Well, in making of this car demo, >> >> https://www.youtube.com/watch?v=zCBESbHSR1k we simply exported the >> submeshes we needed explicit control over as separate obj files and loaded >> each one usign a Mesh component aggregated to an Entity. Each Entity has >> it's own Transform component that we then bind properties to QML >> expressions that reference the Qt Quick Controls, e.g. slider values or >> boolean switches. >> >> You can also have all meshes in a single OBJ file and reference the sub >> mesh you wish to render in the Mesh component. We tried this but found it >> to be better to split them out as it allows more work to be done in >> parallel at start up, leading to faster startup times. >> >> Cheers, >> >> Sean >> >> >> >> Best Regards >> >> Jordon Wu >> >> >> >> _______________________________________________ >> Interest mailing listInterest at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest >> >> >> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From md at rpzdesign.com Thu Feb 25 02:25:18 2016 From: md at rpzdesign.com (md at rpzdesign.com) Date: Wed, 24 Feb 2016 19:25:18 -0600 Subject: [Interest] Android Studio and Qt In-Reply-To: References: <56CE35D4.5060809@rpzdesign.com> Message-ID: <56CE57FE.3010102@rpzdesign.com> Yes, edit the java code uptream and regenerate it back into the build directory. On 2/24/2016 6:41 PM, Jason H wrote: > Hrm, that's not what the instructions said, but I can see your point. If correct though, I'd be usin the Qt-supplied/generated classes, but that means I'm editing code in the build dir? Shouldn't the code be under my project's android dir? > > The article alludes to a projdir/android/src/com/company/... directory. > > >> Sent: Wednesday, February 24, 2016 at 5:59 PM >> From: "md at rpzdesign.com" >> To: interest at qt-project.org >> Subject: Re: [Interest] Android Studio and Qt >> >> Jason: >> >> Its a little tricky, I think you have to open up the created project in >> the build directory, not try to import from the source directory tree >> where the qmake pro file is located. >> >> Look at Build Settings -> Build Steps -> Make: main in /bla/bla/bla >> directory and find the Debug -> android-build directory and magically >> inside this directory is another gradle file. >> >> Import from that build location and Android Studio will come up and be >> able to process the java files while the compiled so C++ files are >> loaded but not able to step into them as a native library. >> >> That help? >> >> md >> >> On 2/24/2016 4:41 PM, Jason H wrote: >>> There is a step missing in http://www.kdab.com/qt-android-episode-6/ >>> Where we go from importing the build.gradle to somehow having Java source to start debugging. >>> >>> Can someone fill in the missing steps? >>> I didn't find any .java files. >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >>> >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest >> From jhihn at gmx.com Thu Feb 25 03:38:00 2016 From: jhihn at gmx.com (Jason H) Date: Thu, 25 Feb 2016 03:38:00 +0100 Subject: [Interest] Android Studio and Qt In-Reply-To: <56CE57FE.3010102@rpzdesign.com> References: <56CE35D4.5060809@rpzdesign.com> , <56CE57FE.3010102@rpzdesign.com> Message-ID: How does one "regenerate it back into the build directory"? I would figure that there would be some ability to extend the supplied QtActivity and tell the build system to use that? But it seems like I need to set up some build steps to overwrite the supplied activity? That doesn't seem 'Qt' to me. Many thanks for the insights so far! > Sent: Wednesday, February 24, 2016 at 8:25 PM > From: "md at rpzdesign.com" > To: No recipient address > Cc: "Jason H" , "interest at qt-project.org" > Subject: Re: [Interest] Android Studio and Qt > > Yes, edit the java code uptream and regenerate it back into the build > directory. > > > > On 2/24/2016 6:41 PM, Jason H wrote: > > Hrm, that's not what the instructions said, but I can see your point. If correct though, I'd be usin the Qt-supplied/generated classes, but that means I'm editing code in the build dir? Shouldn't the code be under my project's android dir? > > > > The article alludes to a projdir/android/src/com/company/... directory. > > > > > >> Sent: Wednesday, February 24, 2016 at 5:59 PM > >> From: "md at rpzdesign.com" > >> To: interest at qt-project.org > >> Subject: Re: [Interest] Android Studio and Qt > >> > >> Jason: > >> > >> Its a little tricky, I think you have to open up the created project in > >> the build directory, not try to import from the source directory tree > >> where the qmake pro file is located. > >> > >> Look at Build Settings -> Build Steps -> Make: main in /bla/bla/bla > >> directory and find the Debug -> android-build directory and magically > >> inside this directory is another gradle file. > >> > >> Import from that build location and Android Studio will come up and be > >> able to process the java files while the compiled so C++ files are > >> loaded but not able to step into them as a native library. > >> > >> That help? > >> > >> md > >> > >> On 2/24/2016 4:41 PM, Jason H wrote: > >>> There is a step missing in http://www.kdab.com/qt-android-episode-6/ > >>> Where we go from importing the build.gradle to somehow having Java source to start debugging. > >>> > >>> Can someone fill in the missing steps? > >>> I didn't find any .java files. > >>> _______________________________________________ > >>> Interest mailing list > >>> Interest at qt-project.org > >>> http://lists.qt-project.org/mailman/listinfo/interest > >>> > >> _______________________________________________ > >> Interest mailing list > >> Interest at qt-project.org > >> http://lists.qt-project.org/mailman/listinfo/interest > >> > > From rpzrpzrpz at gmail.com Thu Feb 25 05:54:59 2016 From: rpzrpzrpz at gmail.com (rpzrpzrpz at gmail.com) Date: Wed, 24 Feb 2016 22:54:59 -0600 Subject: [Interest] Android Studio and Qt In-Reply-To: References: <56CE35D4.5060809@rpzdesign.com> <56CE57FE.3010102@rpzdesign.com> Message-ID: <56CE8923.7080208@gmail.com> Jason: On 2/24/2016 8:38 PM, Jason H wrote: > How does one "regenerate it back into the build directory"? You want to look at the "use gradle builds" and then generate android files in the project android setup in project preferences. This will create an android subdirectory from your project main directory. Put in their your MyActivity.java override java files and then edit them. When you "regenerate the project", these files are copied into the android-build directory. cheers. md > I would figure that there would be some ability to extend the supplied QtActivity and tell the build system to use that? But it seems like I need to set up some build steps to overwrite the supplied activity? That doesn't seem 'Qt' to me. > > Many thanks for the insights so far! > >> Sent: Wednesday, February 24, 2016 at 8:25 PM >> From: "md at rpzdesign.com" >> To: No recipient address >> Cc: "Jason H" , "interest at qt-project.org" >> Subject: Re: [Interest] Android Studio and Qt >> >> Yes, edit the java code uptream and regenerate it back into the build >> directory. >> >> >> >> On 2/24/2016 6:41 PM, Jason H wrote: >>> Hrm, that's not what the instructions said, but I can see your point. If correct though, I'd be usin the Qt-supplied/generated classes, but that means I'm editing code in the build dir? Shouldn't the code be under my project's android dir? >>> >>> The article alludes to a projdir/android/src/com/company/... directory. >>> >>> >>>> Sent: Wednesday, February 24, 2016 at 5:59 PM >>>> From: "md at rpzdesign.com" >>>> To: interest at qt-project.org >>>> Subject: Re: [Interest] Android Studio and Qt >>>> >>>> Jason: >>>> >>>> Its a little tricky, I think you have to open up the created project in >>>> the build directory, not try to import from the source directory tree >>>> where the qmake pro file is located. >>>> >>>> Look at Build Settings -> Build Steps -> Make: main in /bla/bla/bla >>>> directory and find the Debug -> android-build directory and magically >>>> inside this directory is another gradle file. >>>> >>>> Import from that build location and Android Studio will come up and be >>>> able to process the java files while the compiled so C++ files are >>>> loaded but not able to step into them as a native library. >>>> >>>> That help? >>>> >>>> md >>>> >>>> On 2/24/2016 4:41 PM, Jason H wrote: >>>>> There is a step missing in http://www.kdab.com/qt-android-episode-6/ >>>>> Where we go from importing the build.gradle to somehow having Java source to start debugging. >>>>> >>>>> Can someone fill in the missing steps? >>>>> I didn't find any .java files. >>>>> _______________________________________________ >>>>> Interest mailing list >>>>> Interest at qt-project.org >>>>> http://lists.qt-project.org/mailman/listinfo/interest >>>>> >>>> _______________________________________________ >>>> Interest mailing list >>>> Interest at qt-project.org >>>> http://lists.qt-project.org/mailman/listinfo/interest >>>> >> From andre at familiesomers.nl Thu Feb 25 07:55:54 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Thu, 25 Feb 2016 07:55:54 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <4443012.g9HY62BKSb@tjmaciei-mobl4> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> Message-ID: <56CEA57A.6050709@familiesomers.nl> Op 24/02/2016 om 18:23 schreef Thiago Macieira: > On quarta-feira, 24 de fevereiro de 2016 10:22:18 PST Lorenz Haas wrote: >> Foo() : QObject(nullptr) { >> moveToThread(&m_thread); >> m_thread.start(); >> } >> >> ~Foo() { >> m_thread.quit(); >> m_thread.wait(); >> } > This destructor is either never run or deadlocks. > > A QObject can only be destroyed in its thread of affinity. So the above is > running in that m_thread thread, which means it hasn't exited. Waiting for it > to exit will wait forever. > Thanks indeed; I did not spot this issue either. Would it be possible to circumvent this issue by moving the thread object onto its own thread too? Foo() : QObject(nullptr) { moveToThread(&m_thread); m_thread->moveToThread(m_thread); m_thread.start(); } Looks like the much debated move-QThread-onto-its-own-thread antipattern, but it's not the same obviously. André From pr12og2 at programist.ru Thu Feb 25 11:32:15 2016 From: pr12og2 at programist.ru (Prav) Date: Thu, 25 Feb 2016 13:32:15 +0300 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <56CEA57A.6050709@familiesomers.nl> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> <56CEA57A.6050709@familiesomers.nl> Message-ID: <495555918.20160225133215@programist.ru> > Would it be possible to circumvent this issue by moving the thread > object onto its own thread too? > Foo() : QObject(nullptr) { > moveToThread(&m_thread); > m_thread->moveToThread(m_thread); > m_thread.start(); > } > Looks like the much debated move-QThread-onto-its-own-thread > antipattern, but it's not the same obviously. Do you see any help of that action? And how destructor will look like? If it will be as it was before ... this mean that m_thread thread will call its quit() function and I did not get who after that would release memory allocated to Foo? PS you probably ment to write "." instead of "->": m_thread.moveToThread(m_thread); is not it? From andre at familiesomers.nl Thu Feb 25 13:46:25 2016 From: andre at familiesomers.nl (=?UTF-8?Q?Andr=c3=a9_Somers?=) Date: Thu, 25 Feb 2016 13:46:25 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <495555918.20160225133215@programist.ru> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> <56CEA57A.6050709@familiesomers.nl> <495555918.20160225133215@programist.ru> Message-ID: <56CEF7A1.9040806@familiesomers.nl> Op 25/02/2016 om 11:32 schreef Prav: >> Would it be possible to circumvent this issue by moving the thread >> object onto its own thread too? >> Foo() : QObject(nullptr) { >> moveToThread(&m_thread); >> m_thread->moveToThread(m_thread); >> m_thread.start(); >> } >> Looks like the much debated move-QThread-onto-its-own-thread >> antipattern, but it's not the same obviously. > Do you see any help of that action? Not sure what you are asking here. > And how destructor will look like? Same as it was before was the idea: ~Foo() { m_thread.quit(); m_thread.wait(); } > If it will be as it was before ... this mean > that m_thread thread will call its quit() function and > I did not get > who after that would release memory allocated to Foo? Good point. So I guess Foo itself would not be properly destructed this way. Which is what Thiago was saying the first place, reading it back. So, indeed, the conclusion is: this won't work properly. > > PS > you probably ment to write "." instead of "->": > m_thread.moveToThread(m_thread); > is not it? Yeah. Not used to using QObjects as members; I usually use pointers-to-QObjects. André From jhihn at gmx.com Thu Feb 25 14:47:51 2016 From: jhihn at gmx.com (Jason H) Date: Thu, 25 Feb 2016 14:47:51 +0100 Subject: [Interest] Android Studio and Qt In-Reply-To: <56CE8923.7080208@gmail.com> References: <56CE35D4.5060809@rpzdesign.com> <56CE57FE.3010102@rpzdesign.com> , <56CE8923.7080208@gmail.com> Message-ID: > Jason: > > On 2/24/2016 8:38 PM, Jason H wrote: > > How does one "regenerate it back into the build directory"? > > You want to look at the "use gradle builds" and then generate android > files in the project android setup in project preferences. Did that. > This will create an android subdirectory from your project main > directory. Put in their your MyActivity.java override java files and > then edit them. I already had an android directory, maybe this is an issue. Is there a skeleton override file provided for me to start with? Should I just copy the default QtActivity? > When you "regenerate the project", these files are copied into the > android-build directory. Thanks for the help. I now have something to look into. From rpzrpzrpz at gmail.com Thu Feb 25 15:09:23 2016 From: rpzrpzrpz at gmail.com (rpzrpzrpz at gmail.com) Date: Thu, 25 Feb 2016 08:09:23 -0600 Subject: [Interest] Android Studio and Qt In-Reply-To: References: <56CE35D4.5060809@rpzdesign.com> <56CE57FE.3010102@rpzdesign.com> <56CE8923.7080208@gmail.com> Message-ID: <56CF0B13.7010501@gmail.com> You should look at the episodes 1-7 more carefully before tearing into QtActivity. md On 2/25/2016 7:47 AM, Jason H wrote: >> Jason: >> >> On 2/24/2016 8:38 PM, Jason H wrote: >>> How does one "regenerate it back into the build directory"? >> You want to look at the "use gradle builds" and then generate android >> files in the project android setup in project preferences. > Did that. > >> This will create an android subdirectory from your project main >> directory. Put in their your MyActivity.java override java files and >> then edit them. > I already had an android directory, maybe this is an issue. Is there a skeleton override file provided for me to start with? Should I just copy the default QtActivity? > >> When you "regenerate the project", these files are copied into the >> android-build directory. > > Thanks for the help. I now have something to look into. > From smurphy at walbro.com Thu Feb 25 18:24:06 2016 From: smurphy at walbro.com (Murphy, Sean) Date: Thu, 25 Feb 2016 17:24:06 +0000 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <4443012.g9HY62BKSb@tjmaciei-mobl4> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> Message-ID: <954F3AC9B636FB4F933D586E76E307EC61D57507@USWCCEXC04.WALBRONA.WALBROEM.LLC> > > Foo() : QObject(nullptr) { > > moveToThread(&m_thread); > > m_thread.start(); > > } > > > > ~Foo() { > > m_thread.quit(); > > m_thread.wait(); > > } > > This destructor is either never run or deadlocks. > > A QObject can only be destroyed in its thread of affinity. So the above is > running in that m_thread thread, which means it hasn't exited. Waiting for it > to exit will wait forever. Just when I think I have QObjects and QThreads figured out, I realize I don't... How do I correctly handle my situation? I've got a QObject-based class that talks to a custom device and needs to block while making reads/writes to that device. This thread runs the entire duration of my application, because the work it's doing never finishes, it just monitors the device for messages and notifies my UI class when data comes in. So currently I'm doing this: myGUIObject.h: private: myBlockingObject* blocking; QThread* thread; myGUIObject.cpp: myGUIObject() { thread = new QThread(this); blocking = new myBlockingObject(); blocking->moveToThread(thread); } How/where do I properly delete "blocking"? Right now I'm doing this: ~myGUIObject() { thread->exit(); blocking->deleteLater(); } But Thiago's comment "A QObject can only be destroyed in its thread of affinity" sounds like it's not the right way to do it? Sean From elvstone at gmail.com Thu Feb 25 19:10:00 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Thu, 25 Feb 2016 19:10:00 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <954F3AC9B636FB4F933D586E76E307EC61D57507@USWCCEXC04.WALBRONA.WALBROEM.LLC> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> <954F3AC9B636FB4F933D586E76E307EC61D57507@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: 2016-02-25 18:24 GMT+01:00 Murphy, Sean : >> > Foo() : QObject(nullptr) { >> > moveToThread(&m_thread); >> > m_thread.start(); >> > } >> > >> > ~Foo() { >> > m_thread.quit(); >> > m_thread.wait(); >> > } >> >> This destructor is either never run or deadlocks. >> >> A QObject can only be destroyed in its thread of affinity. So the above is >> running in that m_thread thread, which means it hasn't exited. Waiting for it >> to exit will wait forever. > > Just when I think I have QObjects and QThreads figured out, I realize I don't... How do I correctly handle my situation? > > I've got a QObject-based class that talks to a custom device and needs to block while making reads/writes to that device. This thread runs the entire duration of my application, because the work it's doing never finishes, it just monitors the device for messages and notifies my UI class when data comes in. > > So currently I'm doing this: > > myGUIObject.h: > private: > myBlockingObject* blocking; > QThread* thread; > > myGUIObject.cpp: > myGUIObject() > { > thread = new QThread(this); > blocking = new myBlockingObject(); > blocking->moveToThread(thread); > } > > How/where do I properly delete "blocking"? Right now I'm doing this: > ~myGUIObject() > { > thread->exit(); > blocking->deleteLater(); > } > > But Thiago's comment "A QObject can only be destroyed in its thread of affinity" sounds like it's not the right way to do it? > Sean I was in a similar situation some years ago, talking to a USB/serial device in a separate thread. I had a look at the code, and what I did back then was to connect the finished signal of the thread to the deleteLater() slot of the object I had moved to the thread. I actually did the same with the thread itself. So the connect() calls I did to ensure cleanup looked something like this: // Connect to thread signals to start the sensor and clean up. connect(m_sensorThread, SIGNAL(started()), sensor, SLOT(start())); connect(m_sensorThread, SIGNAL(finished()), sensor, SLOT(deleteLater())); connect(m_sensorThread, SIGNAL(finished()), m_sensorThread, SLOT(deleteLater())); Where sensor is the object I had previously moved to m_senseorThread. Not sure if your approach above with calling deleteLater() explicitly and immediately after thread->exit() is right or wrong, or if doing it by signal/slot connections like I did is any better. Just thought I would chime in :) Elvis > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From elvstone at gmail.com Thu Feb 25 19:23:26 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Thu, 25 Feb 2016 19:23:26 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> <954F3AC9B636FB4F933D586E76E307EC61D57507@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: 2016-02-25 19:10 GMT+01:00 Elvis Stansvik : > 2016-02-25 18:24 GMT+01:00 Murphy, Sean : >>> > Foo() : QObject(nullptr) { >>> > moveToThread(&m_thread); >>> > m_thread.start(); >>> > } >>> > >>> > ~Foo() { >>> > m_thread.quit(); >>> > m_thread.wait(); >>> > } >>> >>> This destructor is either never run or deadlocks. >>> >>> A QObject can only be destroyed in its thread of affinity. So the above is >>> running in that m_thread thread, which means it hasn't exited. Waiting for it >>> to exit will wait forever. >> >> Just when I think I have QObjects and QThreads figured out, I realize I don't... How do I correctly handle my situation? >> >> I've got a QObject-based class that talks to a custom device and needs to block while making reads/writes to that device. This thread runs the entire duration of my application, because the work it's doing never finishes, it just monitors the device for messages and notifies my UI class when data comes in. >> >> So currently I'm doing this: >> >> myGUIObject.h: >> private: >> myBlockingObject* blocking; >> QThread* thread; >> >> myGUIObject.cpp: >> myGUIObject() >> { >> thread = new QThread(this); >> blocking = new myBlockingObject(); >> blocking->moveToThread(thread); >> } >> >> How/where do I properly delete "blocking"? Right now I'm doing this: >> ~myGUIObject() >> { >> thread->exit(); >> blocking->deleteLater(); >> } >> >> But Thiago's comment "A QObject can only be destroyed in its thread of affinity" sounds like it's not the right way to do it? >> Sean > > I was in a similar situation some years ago, talking to a USB/serial > device in a separate thread. I had a look at the code, and what I did > back then was to connect the finished signal of the thread to the > deleteLater() slot of the object I had moved to the thread. I actually > did the same with the thread itself. So the connect() calls I did to > ensure cleanup looked something like this: > > // Connect to thread signals to start the sensor and clean up. > connect(m_sensorThread, SIGNAL(started()), sensor, SLOT(start())); > connect(m_sensorThread, SIGNAL(finished()), sensor, SLOT(deleteLater())); > connect(m_sensorThread, SIGNAL(finished()), m_sensorThread, > SLOT(deleteLater())); > > Where sensor is the object I had previously moved to m_senseorThread. > > Not sure if your approach above with calling deleteLater() explicitly > and immediately after thread->exit() is right or wrong, or if doing it > by signal/slot connections like I did is any better. Just thought I > would chime in :) I see now that this technique is actually right there in the QThread docs, under "Managing Thread", third paragraph [1]: "From Qt 4.8 onwards, it is possible to deallocate objects that live in a thread that has just ended, by connecting the finished() signal to QObject::deleteLater()." So I think this is the approach you should use. The initial example in the class docs also shows the "suicide" approach of destructing the thread itself: connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater); In the example you gave, I think you're leaking the thread. Cheers, Elvis [1] http://doc.qt.io/qt-5/qthread.html#managing-threads > > Elvis > >> _______________________________________________ >> Interest mailing list >> Interest at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest From elvstone at gmail.com Thu Feb 25 19:25:09 2016 From: elvstone at gmail.com (Elvis Stansvik) Date: Thu, 25 Feb 2016 19:25:09 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> <954F3AC9B636FB4F933D586E76E307EC61D57507@USWCCEXC04.WALBRONA.WALBROEM.LLC> Message-ID: 2016-02-25 19:23 GMT+01:00 Elvis Stansvik : > 2016-02-25 19:10 GMT+01:00 Elvis Stansvik : >> 2016-02-25 18:24 GMT+01:00 Murphy, Sean : >>>> > Foo() : QObject(nullptr) { >>>> > moveToThread(&m_thread); >>>> > m_thread.start(); >>>> > } >>>> > >>>> > ~Foo() { >>>> > m_thread.quit(); >>>> > m_thread.wait(); >>>> > } >>>> >>>> This destructor is either never run or deadlocks. >>>> >>>> A QObject can only be destroyed in its thread of affinity. So the above is >>>> running in that m_thread thread, which means it hasn't exited. Waiting for it >>>> to exit will wait forever. >>> >>> Just when I think I have QObjects and QThreads figured out, I realize I don't... How do I correctly handle my situation? >>> >>> I've got a QObject-based class that talks to a custom device and needs to block while making reads/writes to that device. This thread runs the entire duration of my application, because the work it's doing never finishes, it just monitors the device for messages and notifies my UI class when data comes in. >>> >>> So currently I'm doing this: >>> >>> myGUIObject.h: >>> private: >>> myBlockingObject* blocking; >>> QThread* thread; >>> >>> myGUIObject.cpp: >>> myGUIObject() >>> { >>> thread = new QThread(this); >>> blocking = new myBlockingObject(); >>> blocking->moveToThread(thread); >>> } >>> >>> How/where do I properly delete "blocking"? Right now I'm doing this: >>> ~myGUIObject() >>> { >>> thread->exit(); >>> blocking->deleteLater(); >>> } >>> >>> But Thiago's comment "A QObject can only be destroyed in its thread of affinity" sounds like it's not the right way to do it? >>> Sean >> >> I was in a similar situation some years ago, talking to a USB/serial >> device in a separate thread. I had a look at the code, and what I did >> back then was to connect the finished signal of the thread to the >> deleteLater() slot of the object I had moved to the thread. I actually >> did the same with the thread itself. So the connect() calls I did to >> ensure cleanup looked something like this: >> >> // Connect to thread signals to start the sensor and clean up. >> connect(m_sensorThread, SIGNAL(started()), sensor, SLOT(start())); >> connect(m_sensorThread, SIGNAL(finished()), sensor, SLOT(deleteLater())); >> connect(m_sensorThread, SIGNAL(finished()), m_sensorThread, >> SLOT(deleteLater())); >> >> Where sensor is the object I had previously moved to m_senseorThread. >> >> Not sure if your approach above with calling deleteLater() explicitly >> and immediately after thread->exit() is right or wrong, or if doing it >> by signal/slot connections like I did is any better. Just thought I >> would chime in :) > > I see now that this technique is actually right there in the QThread > docs, under "Managing Thread", third paragraph [1]: > > "From Qt 4.8 onwards, it is possible to deallocate objects that live > in a thread that has just ended, by connecting the finished() signal > to QObject::deleteLater()." > > So I think this is the approach you should use. > > The initial example in the class docs also shows the "suicide" > approach of destructing the thread itself: > > connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater); Err, I meant the second example, and was going to paste: connect(workerThread, &WorkerThread::finished, workerThread, &QObject::deleteLater); Elvis > > In the example you gave, I think you're leaking the thread. > > Cheers, > Elvis > > [1] http://doc.qt.io/qt-5/qthread.html#managing-threads > >> >> Elvis >> >>> _______________________________________________ >>> Interest mailing list >>> Interest at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest From philwave at gmail.com Fri Feb 26 14:51:06 2016 From: philwave at gmail.com (Philippe) Date: Fri, 26 Feb 2016 14:51:06 +0100 Subject: [Interest] Qt 5.6 and DBus under Windows Message-ID: <20160226145105.EC01.6F0322A@gmail.com> When building Qt 5.6 on Windows, there is a new DLL called Qt5DBus.dll which did not exist in past Qt 5.x versions I have built on my machine. Is it a new capability introduced by 5.6 (not mentionned in https://wiki.qt.io/New_Features_in_Qt_5.6 ) Philippe From roland.m.winklmeier at gmail.com Fri Feb 26 15:32:30 2016 From: roland.m.winklmeier at gmail.com (Roland Winklmeier) Date: Fri, 26 Feb 2016 15:32:30 +0100 Subject: [Interest] Qt 5.6 and DBus under Windows In-Reply-To: <20160226145105.EC01.6F0322A@gmail.com> References: <20160226145105.EC01.6F0322A@gmail.com> Message-ID: Hi, 2016-02-26 14:51 GMT+01:00 Philippe : > When building Qt 5.6 on Windows, there is a new DLL called Qt5DBus.dll > which did not exist in past Qt 5.x versions I have built on my machine. > > Is it a new capability introduced by 5.6 (not mentionned in > https://wiki.qt.io/New_Features_in_Qt_5.6 > ) > it was enabled on official Windows binaries for 5.4.1. See http://lists.qt-project.org/pipermail/development/2014-December/019462.html Cheers R. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhihn at gmx.com Fri Feb 26 16:22:12 2016 From: jhihn at gmx.com (Jason H) Date: Fri, 26 Feb 2016 16:22:12 +0100 Subject: [Interest] Android Studio and Qt In-Reply-To: <56CF0B13.7010501@gmail.com> References: <56CE35D4.5060809@rpzdesign.com> <56CE57FE.3010102@rpzdesign.com> <56CE8923.7080208@gmail.com> , <56CF0B13.7010501@gmail.com> Message-ID: Well the only way is to just hack at it. The stuff I wanted was on page 7, but it doesn't allude to that on page 6. Anyway, I'm not sure why we have to use gradle as my Android stuff works and I still seem to be using Ant? > Sent: Thursday, February 25, 2016 at 9:09 AM > From: "rpzrpzrpz at gmail.com" > To: "interest at qt-project.org" > Cc: "Jason H" > Subject: Re: [Interest] Android Studio and Qt > > You should look at the episodes 1-7 more carefully before tearing into > QtActivity. > > md > > On 2/25/2016 7:47 AM, Jason H wrote: > >> Jason: > >> > >> On 2/24/2016 8:38 PM, Jason H wrote: > >>> How does one "regenerate it back into the build directory"? > >> You want to look at the "use gradle builds" and then generate android > >> files in the project android setup in project preferences. > > Did that. > > > >> This will create an android subdirectory from your project main > >> directory. Put in their your MyActivity.java override java files and > >> then edit them. > > I already had an android directory, maybe this is an issue. Is there a skeleton override file provided for me to start with? Should I just copy the default QtActivity? > > > >> When you "regenerate the project", these files are copied into the > >> android-build directory. > > > > Thanks for the help. I now have something to look into. > > > > From jhihn at gmx.com Fri Feb 26 18:58:31 2016 From: jhihn at gmx.com (Jason H) Date: Fri, 26 Feb 2016 18:58:31 +0100 Subject: [Interest] Native Sqlite on iOS Message-ID: I have to write some native implementation functions (ObjC) for my Qt/QML app. I'm wondering about having to include/link sqlite library. I'm not really a iOS guy, just a Qt guy having to hack some native functionality. Do I have to link another sqlite3? Can I just run the one that Qt uses? From jhihn at gmx.com Fri Feb 26 19:50:10 2016 From: jhihn at gmx.com (Jason H) Date: Fri, 26 Feb 2016 19:50:10 +0100 Subject: [Interest] Native Sqlite on iOS In-Reply-To: References: Message-ID: > I have to write some native implementation functions (ObjC) for my Qt/QML app. I'm wondering about having to include/link sqlite library. I'm not really a iOS guy, just a Qt guy having to hack some native functionality. > Do I have to link another sqlite3? Can I just run the one that Qt uses? Additionally, how do I accurately determine the offline database? There is QQmlEngine::offlineStoragePath(), but the database itself isin that plus "/Databases/" + a hash-lookingvalue.sqlite From thiago.macieira at intel.com Sat Feb 27 02:57:59 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Fri, 26 Feb 2016 17:57:59 -0800 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <56CEA57A.6050709@familiesomers.nl> References: <4443012.g9HY62BKSb@tjmaciei-mobl4> <56CEA57A.6050709@familiesomers.nl> Message-ID: <20928534.6hUmrBbQqm@tjmaciei-mobl4> On quinta-feira, 25 de fevereiro de 2016 07:55:54 PST André Somers wrote: > Op 24/02/2016 om 18:23 schreef Thiago Macieira: > Would it be possible to circumvent this issue by moving the thread > object onto its own thread too? > > Foo() : QObject(nullptr) { > moveToThread(&m_thread); > m_thread->moveToThread(m_thread); > m_thread.start(); > } > > > Looks like the much debated move-QThread-onto-its-own-thread > antipattern, but it's not the same obviously. No, that is exactly the "you're doing it wrong" pattern. It's just hidden by the fact that you moved it from outside the class, so you didn't use "this". And like Prav said, this doesn't solve much. Foo's destructor must run inside that thread, so that thread hasn't exited. If the destructor tries to wait() for the thread to exit, it will deadlock. The solution is to move the Foo object to another thread before destroying it. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Sat Feb 27 03:07:26 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Fri, 26 Feb 2016 18:07:26 -0800 Subject: [Interest] Qt 5.6 and DBus under Windows In-Reply-To: References: <20160226145105.EC01.6F0322A@gmail.com> Message-ID: <4200785.tYFrBHtk0p@tjmaciei-mobl4> On sexta-feira, 26 de fevereiro de 2016 15:32:30 PST Roland Winklmeier wrote: > Hi, > > 2016-02-26 14:51 GMT+01:00 Philippe : > > When building Qt 5.6 on Windows, there is a new DLL called Qt5DBus.dll > > which did not exist in past Qt 5.x versions I have built on my machine. > > > > Is it a new capability introduced by 5.6 (not mentionned in > > https://wiki.qt.io/New_Features_in_Qt_5.6 > > ) > > it was enabled on official Windows binaries for 5.4.1. See > http://lists.qt-project.org/pipermail/development/2014-December/019462.html QtDBus has existed even on Windows since mid-Qt4 days (at least 4.5, probably since 4.4, possibly even 4.3, but I don't remember it working in 4.2). It's even been able to run on Windows CE since Qt 4.7. So it's not a new feature and that's why you don't find it in the new feature list. The "new feature" was in Qt 5.4.0 when I added the ability for QtDBus to be compiled without having libdbus-1 present. Then I made that the default in 5.4.1. You still need the libdbus-1 DLL to be present in order to do anything with QtDBus. Without it, QDBusConnection will simply report it failed to connect. The rewrite of QtDBus to work without libdbus-1 has been ongoing for a year, in my free time. I might finish it for Qt 5.9, but it's unlikely. It all depends on how widespread kdbus goes on Linux. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From syamcr at gmail.com Sat Feb 27 07:15:50 2016 From: syamcr at gmail.com (Syam) Date: Sat, 27 Feb 2016 11:45:50 +0530 Subject: [Interest] Emitting signal from QThread::run() Message-ID: Hello, Inspired from the recent discussions on QThread, I have the following question. I have: class MyThread : public QThread { Q_OBJECT //the constructor and other stuff signals: void mySignal(); protected: virtual void run() { while(true) { //do something if(some_condition) emit mySignal(); } } }; void MainWindow::someFunction() { MyThread *thread = new MyThread; connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), Qt::QueuedConnection); thread->start(); } ////////////////// Will the above code work fine? In myGuiSlot() I am typically manipulating some widgets - setting the text of a QLabel etc. -- Regards, Syam syamcr at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Sat Feb 27 07:49:22 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Fri, 26 Feb 2016 22:49:22 -0800 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: References: Message-ID: <3894305.zbkW0hgMU5@tjmaciei-mobl4> On sábado, 27 de fevereiro de 2016 11:45:50 PST Syam wrote: > void MainWindow::someFunction() > { > MyThread *thread = new MyThread; > connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), > Qt::QueuedConnection); > thread->start(); > } > > > ////////////////// > > Will the above code work fine? In myGuiSlot() I am typically manipulating > some widgets - setting the text of a QLabel etc. Yes. The signal will be queued anyway. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From lykurg at gmail.com Sat Feb 27 11:58:09 2016 From: lykurg at gmail.com (Lorenz Haas) Date: Sat, 27 Feb 2016 11:58:09 +0100 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: <4443012.g9HY62BKSb@tjmaciei-mobl4> References: <56CD714D.6090705@familiesomers.nl> <4443012.g9HY62BKSb@tjmaciei-mobl4> Message-ID: 2016-02-24 18:23 GMT+01:00 Thiago Macieira : > On quarta-feira, 24 de fevereiro de 2016 10:22:18 PST Lorenz Haas wrote: >> Foo() : QObject(nullptr) { >> moveToThread(&m_thread); >> m_thread.start(); >> } >> >> ~Foo() { >> m_thread.quit(); >> m_thread.wait(); >> } > > This destructor is either never run or deadlocks. > > A QObject can only be destroyed in its thread of affinity. So the above is > running in that m_thread thread, which means it hasn't exited. Waiting for it > to exit will wait forever. A follow up question of _pure academic_ nature: Using deleteLater() on an instance of Foo is not working since the thread deadlocks - just as you said. But how about using "delete foo;" in main (regarding your comment "A QObject can only be destroyed in its thread of affinity.")? Using delete a) the destructor would run in the GUI thread and therefor should be fine to quit() and wait() the thread b) after wait() the event loop of Foo is done and, suppose there is no other concurrent access, it should be fine to delete Foo and its QObject base class. The documentation states http://doc.qt.io/qt-5/threads-qobject.html: "Calling delete on a QObject from a thread other than the one that owns the object (or accessing the object in other ways) is unsafe, unless you guarantee that the object isn't processing events at that moment." So it's all about the "unless..." part. Technically at the moment one is calling delete it's not guaranteed that there are no events. Inside the destructor, however, it is. So, assumed the documentation is right, would this special "delete foo;" use case in main() be safe? Once again, it's not for practical use, it's just out of technical curiosity a colleague of mine came up with. Thanks Lorenz From suy at badopi.org Sat Feb 27 17:26:32 2016 From: suy at badopi.org (Alejandro Exojo) Date: Sat, 27 Feb 2016 17:26:32 +0100 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <3894305.zbkW0hgMU5@tjmaciei-mobl4> References: <3894305.zbkW0hgMU5@tjmaciei-mobl4> Message-ID: <201602271726.32875.suy@badopi.org> El Saturday 27 February 2016, Thiago Macieira escribió: > On sábado, 27 de fevereiro de 2016 11:45:50 PST Syam wrote: > > void MainWindow::someFunction() > > { > > > > MyThread *thread = new MyThread; > > connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), > > > > Qt::QueuedConnection); > > > > thread->start(); > > > > } > > > > > > ////////////////// > > > > Will the above code work fine? In myGuiSlot() I am typically manipulating > > some widgets - setting the text of a QLabel etc. > > Yes. The signal will be queued anyway. Will be queued without the explicit QueuedConnection? In other words, what does AutoConnection do here? run() is executed in another thread, but the QThread is in the same thread of MainWindow, right? -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net From boucard_olivier at yahoo.fr Sat Feb 27 20:16:57 2016 From: boucard_olivier at yahoo.fr (BOUCARD Olivier) Date: Sat, 27 Feb 2016 19:16:57 +0000 (UTC) Subject: [Interest] QML Context2D createPattern not working when using an Image item References: <2102549612.448452.1456600617641.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <2102549612.448452.1456600617641.JavaMail.yahoo@mail.yahoo.com> Hi, On Qt 5.5.1 MinGW 32bit. I'm making some test with the QML Canvas. And I was trying to fill a rectangle with a PNG as pattern. My Image is loaded using a QML Image item. My drawing commands are in a separate Javascript file. I access the image by adding an alias property to the Canvas pointing to the Image item. I do this to simplify access in the Javascript file. If I call drawImage using the alias it is working. If I create a pattern using the same alias, set fillStyle and draw a rectangle, nothing is drawn. If I create a pattern using the URL of the image then it works. Is there something I missed or should I fill a bug report? Thanks From thiago.macieira at intel.com Sat Feb 27 20:18:35 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sat, 27 Feb 2016 11:18:35 -0800 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <201602271726.32875.suy@badopi.org> References: <3894305.zbkW0hgMU5@tjmaciei-mobl4> <201602271726.32875.suy@badopi.org> Message-ID: <5855493.6AxSqZOjpK@tjmaciei-mobl4> On sábado, 27 de fevereiro de 2016 17:26:32 PST Alejandro Exojo wrote: > El Saturday 27 February 2016, Thiago Macieira escribió: > > On sábado, 27 de fevereiro de 2016 11:45:50 PST Syam wrote: > > > void MainWindow::someFunction() > > > { > > > > > > MyThread *thread = new MyThread; > > > connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), > > > > > > Qt::QueuedConnection); > > > > > > thread->start(); > > > > > > } > > > > > > > > > ////////////////// > > > > > > Will the above code work fine? In myGuiSlot() I am typically > > > manipulating > > > some widgets - setting the text of a QLabel etc. > > > > Yes. The signal will be queued anyway. > > Will be queued without the explicit QueuedConnection? In other words, what > does AutoConnection do here? run() is executed in another thread, but the > QThread is in the same thread of MainWindow, right? It would have been queued with AutoConnection, yes. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From thiago.macieira at intel.com Sat Feb 27 20:22:33 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sat, 27 Feb 2016 11:22:33 -0800 Subject: [Interest] moveToThread used in constructor to move "this" In-Reply-To: References: <4443012.g9HY62BKSb@tjmaciei-mobl4> Message-ID: <1939323.DAuk69htpo@tjmaciei-mobl4> On sábado, 27 de fevereiro de 2016 11:58:09 PST Lorenz Haas wrote: > So it's all about the "unless..." part. Technically at the moment one > is calling delete it's not guaranteed that there are no events. Inside > the destructor, however, it is. So, assumed the documentation is > right, would this special "delete foo;" use case in main() be safe? If the object has timers or it tries to destroy QSocketNotifiers, it will also fail. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From pr12og2 at programist.ru Sat Feb 27 22:25:51 2016 From: pr12og2 at programist.ru (Prav) Date: Sun, 28 Feb 2016 00:25:51 +0300 Subject: [Interest] Building Qt 5.6 rc with msvc 2010 Message-ID: <1019586352.20160228002551@programist.ru> Does anyone built 5.6 rc with msvc 2010? I got errors like (this is the first): cl -c -Yc -Fp.pch\release\Qt5OpenGL_pch.pch -Fo.pch\release\Qt5OpenGL_pch.obj -nologo -Zc:wchar_t -O2 -MD -W3 -w34100 -w34189 -w44996 -DUNICODE -DWIN32 -DQT_NO_USING_NAMESPACE -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DYNAMIC_CAST -DNDEBUG -I. -I..\..\include -I..\..\include\QtOpenGL -I..\..\include\QtOpenGL\5.6.0 -I..\..\include\QtOpenGL\5.6.0\QtOpenGL -Itmp -I..\..\include\QtWidgets\5.6.0 -I..\..\include\QtWidgets\5.6.0\QtWidgets -I..\..\include\QtGui\5.6.0 -I..\..\include\QtGui\5.6.0\QtGui -I..\..\include\QtCore\5.6.0 -I..\..\include\QtCore\5.6.0\QtCore -I..\..\include\QtWidgets -I..\..\include\QtGui -I..\..\include\QtCore -I.moc\release -I..\..\mkspecs\win32-msvc2010 -TP ..\..\include\QtOpenGL\QtOpenGLDepends QtOpenGLDepends ... \qt\qtbase\include\qtgui\../../src/gui/opengl/qopengles2ext.h(22) : error C2146: syntax error : missing ';' before identifier 'GLint64' While this exact cmd-file builds Qt 5.6 beta successfully. I hope possibility of building Qt with msvc 2010 is not planned to be prohibited (or broken) for Qt 5.6 final ! From nunosantos at imaginando.pt Sat Feb 27 23:46:32 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sat, 27 Feb 2016 22:46:32 +0000 Subject: [Interest] Building Qt 5.6 rc with msvc 2010 In-Reply-To: <1019586352.20160228002551@programist.ru> Message-ID: There is a known bug that affects windows building. You need to patch syncqt.pl and run it again. Check bug 51324 Em 27/02/2016 21:25, Prav escreveu: > > Does anyone built 5.6 rc with msvc 2010? > > I got errors like (this is the first): >   cl -c -Yc -Fp.pch\release\Qt5OpenGL_pch.pch -Fo.pch\release\Qt5OpenGL_pch.obj -nologo -Zc:wchar_t -O2 -MD -W3 -w34100 -w34189 -w44996 -DUNICODE -DWIN32 -DQT_NO_USING_NAMESPACE -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DYNAMIC_CAST -DNDEBUG -I. -I..\..\include -I..\..\include\QtOpenGL -I..\..\include\QtOpenGL\5.6.0 -I..\..\include\QtOpenGL\5.6.0\QtOpenGL -Itmp -I..\..\include\QtWidgets\5.6.0 -I..\..\include\QtWidgets\5.6.0\QtWidgets -I..\..\include\QtGui\5.6.0 -I..\..\include\QtGui\5.6.0\QtGui -I..\..\include\QtCore\5.6.0 -I..\..\include\QtCore\5.6.0\QtCore -I..\..\include\QtWidgets -I..\..\include\QtGui -I..\..\include\QtCore -I.moc\release -I..\..\mkspecs\win32-msvc2010 -TP ..\..\include\QtOpenGL\Q > tOpenGLDepends > QtOpenGLDepends > ... \qt\qtbase\include\qtgui\../../src/gui/opengl/qopengles2ext.h(22) : error C2146: syntax error : missing ';' before identifier 'GLint64' > > While this exact cmd-file builds Qt 5.6 beta successfully. > > > I hope possibility of building Qt with msvc 2010 is not planned to be prohibited (or broken) for Qt 5.6 final ! > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest From szehowe.koh at gmail.com Sun Feb 28 01:21:30 2016 From: szehowe.koh at gmail.com (Sze Howe Koh) Date: Sun, 28 Feb 2016 08:21:30 +0800 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <201602271726.32875.suy@badopi.org> References: <3894305.zbkW0hgMU5@tjmaciei-mobl4> <201602271726.32875.suy@badopi.org> Message-ID: On 28 February 2016 at 00:26, Alejandro Exojo wrote: > > El Saturday 27 February 2016, Thiago Macieira escribió: > > On sábado, 27 de fevereiro de 2016 11:45:50 PST Syam wrote: > > > void MainWindow::someFunction() > > > { > > > > > > MyThread *thread = new MyThread; > > > connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), > > > > > > Qt::QueuedConnection); > > > > > > thread->start(); > > > > > > } > > > > > > > > > ////////////////// > > > > > > Will the above code work fine? In myGuiSlot() I am typically manipulating > > > some widgets - setting the text of a QLabel etc. > > > > Yes. The signal will be queued anyway. > > Will be queued without the explicit QueuedConnection? In other words, what > does AutoConnection do here? run() is executed in another thread, but the > QThread is in the same thread of MainWindow, right? See http://doc.qt.io/qt-5/qt.html#ConnectionType-enum "If the receiver lives in the thread that emits the signal, Qt::DirectConnection is used. Otherwise, Qt::QueuedConnection is used. The connection type is determined when the signal is emitted." Qt checks to see which thread the signal is emitted from. Qt does not check which thread the signal sender lives in. Regards, Sze-Howe From jagernicolas at legtux.org Sun Feb 28 05:15:33 2016 From: jagernicolas at legtux.org (jagernicolas at legtux.org) Date: Sun, 28 Feb 2016 04:15:33 +0000 Subject: [Interest] qml <--> c++ Message-ID: <533006fcb1f93ada3c141aedbc3aa311@legtux.org> Hi, in my main.qml I have this code : WebEngineView { id: webview url: "192.168.2.1" anchors.fill: parent onNewViewRequested: { var w_ = crecreateObject() request.openIn(appWin.w_) } } when onNewViewRequested is called, I would like to open the url of the request in the the same WebEngineView, not creating a new WebEngine. So I was thinking to create some class who inherits of WebEngine. I didn't found any class called WebEngine I can inherit, or I did not found the header... but I found QWebEngine, so I did this : // in CustomWebView.h #pragma once #include class CustomWebView : public QWebEngineView { Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged) public: CustomWebView(QWidget *parent); CustomWebView(); }; I register the qml inside my main.cpp : qmlRegisterType("customWebView", 1, 0, "CustomWebView"); and in my main.qml I did some changes/add : import CustomWebView 1.0 CustomWebView { id: webview url: "192.168.2.1" anchors.fill: parent // onNewViewRequested: { // var w_ = crecreateObject() // request.openIn(appWin.w_) // } } but, when I compiled, I got the msg : Cannot assign to non-existent property "url" obviously, I didi some mistake, but where ? Regards, Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at rightsoft.com.au Sun Feb 28 08:02:05 2016 From: tony at rightsoft.com.au (Tony Rietwyk) Date: Sun, 28 Feb 2016 18:02:05 +1100 Subject: [Interest] qml <--> c++ In-Reply-To: <533006fcb1f93ada3c141aedbc3aa311@legtux.org> References: <533006fcb1f93ada3c141aedbc3aa311@legtux.org> Message-ID: <003001d171f5$ef5275e0$cdf761a0$@rightsoft.com.au> Hi Nicolas, I can see you left out Q_OBJECT on CustomWebView. Not idea whether the rest will work or not to achieve your aim. Tony From: Interest [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of jagernicolas at legtux.org Sent: Sunday, 28 February 2016 3:16 PM To: interest at qt-project.org Subject: [Interest] qml <--> c++ Hi, in my main.qml I have this code : WebEngineView { id: webview url: "192.168.2.1" anchors.fill: parent onNewViewRequested: { var w_ = crecreateObject() request.openIn(appWin.w_) } } when onNewViewRequested is called, I would like to open the url of the request in the the same WebEngineView, not creating a new WebEngine. So I was thinking to create some class who inherits of WebEngine. I didn't found any class called WebEngine I can inherit, or I did not found the header... but I found QWebEngine, so I did this : // in CustomWebView.h #pragma once #include class CustomWebView : public QWebEngineView { Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged) public: CustomWebView(QWidget *parent); CustomWebView(); }; I register the qml inside my main.cpp : qmlRegisterType("customWebView", 1, 0, "CustomWebView"); and in my main.qml I did some changes/add : import CustomWebView 1.0 CustomWebView { id: webview url: "192.168.2.1" anchors.fill: parent // onNewViewRequested: { // var w_ = crecreateObject() // request.openIn(appWin.w_) // } } but, when I compiled, I got the msg : Cannot assign to non-existent property "url" obviously, I didi some mistake, but where ? Regards, Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From suy at badopi.org Sun Feb 28 10:02:00 2016 From: suy at badopi.org (Alejandro Exojo) Date: Sun, 28 Feb 2016 10:02:00 +0100 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: References: <201602271726.32875.suy@badopi.org> Message-ID: <201602281002.00538.suy@badopi.org> El Sunday 28 February 2016, Sze Howe Koh escribió: > > Will be queued without the explicit QueuedConnection? In other words, > > what does AutoConnection do here? run() is executed in another thread, > > but the QThread is in the same thread of MainWindow, right? > > See http://doc.qt.io/qt-5/qt.html#ConnectionType-enum > > "If the receiver lives in the thread that emits the signal, > Qt::DirectConnection is used. Otherwise, Qt::QueuedConnection is used. > The connection type is determined when the signal is emitted." > > Qt checks to see which thread the signal is emitted from. Qt does not > check which thread the signal sender lives in. Thank you. I don't think that the documentation is totally clear in this regard. The quote you pasted has a link to the explanation of thread affinity which says: "By default, a QObject lives in the thread in which it is created. An object's thread affinity can be queried using thread() and changed using moveToThread()." In the context of the previous example, I wasn't entirely sure if this was a possibility: 1. The QThread-derived instance is created in the thread of MainWindow. 2. That instance is not moved to other thread, so it keeps the thread affinity of the MainWindow. 3. When a signal is emitted in run(), the thread affinity checked is somehow "stored" in the instance, and since moveToThread did not change it, it's still the same of MainWindow. Now I have the confirmation that the 3rd point is wrong, which is good. :) I think at some point (when learning about QThread, etc.) we've all checked it ourselves calling this->thread() and QThread::currentThread() to see what they returned. :) -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net From jagernicolas at legtux.org Sun Feb 28 14:45:52 2016 From: jagernicolas at legtux.org (Nicolas =?UTF-8?B?SsOkZ2Vy?=) Date: Sun, 28 Feb 2016 08:45:52 -0500 Subject: [Interest] qml <--> c++ In-Reply-To: <003001d171f5$ef5275e0$cdf761a0$@rightsoft.com.au> References: <533006fcb1f93ada3c141aedbc3aa311@legtux.org> <003001d171f5$ef5275e0$cdf761a0$@rightsoft.com.au> Message-ID: <20160228084552.7313e7b6@motorhead> Hi Tony, yesterday when I compiled with Q_OBJECT I got error, but today it works, I have no idea why...but yes I agree I should have Q_OBJECT. But this doesn't solve my problem. Also I guess I can rewrite a new class who inherits of QWebEngineView with all Q_PROPERTY and stuff to make it works as I want, but since we are talking about C++ I expecting to be able to inherits the QML code associated to the class (QWebEngineView), instead of rewrittng all QML code (for that class) from scratch. regards, Nicolas "Tony Rietwyk" wrote: > Hi Nicolas, > > > > I can see you left out Q_OBJECT on CustomWebView. Not idea whether the rest will work or not to > achieve your aim. > > > > Tony > > > > > > From: Interest [mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of > jagernicolas at legtux.org Sent: Sunday, 28 February 2016 3:16 PM > To: interest at qt-project.org > Subject: [Interest] qml <--> c++ > > > > Hi, > > in my main.qml I have this code : > > WebEngineView { > id: webview > url: "192.168.2.1" > anchors.fill: parent > onNewViewRequested: { > var w_ = crecreateObject() > request.openIn(appWin.w_) > } > } > > when onNewViewRequested is called, I would like to open the url of the request in the the same > WebEngineView, not creating a new WebEngine. So I was thinking to create some class who inherits > of WebEngine. > > I didn't found any class called WebEngine I can inherit, or I did not found the header... but I > found QWebEngine, so I did this : > > // in CustomWebView.h > #pragma once > #include > > class CustomWebView : public QWebEngineView > { > Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged) > > public: > CustomWebView(QWidget *parent); > CustomWebView(); > > }; > > I register the qml inside my main.cpp : > > qmlRegisterType("customWebView", 1, 0, "CustomWebView"); > > and in my main.qml I did some changes/add : > > import CustomWebView 1.0 > > CustomWebView { > id: webview > url: "192.168.2.1" > anchors.fill: parent > // onNewViewRequested: { > // var w_ = crecreateObject() > // request.openIn(appWin.w_) > // } > } > > but, when I compiled, I got the msg : Cannot assign to non-existent property "url" > > obviously, I didi some mistake, but where ? > > Regards, > Nicolas > > > From pr12og2 at programist.ru Sun Feb 28 15:33:34 2016 From: pr12og2 at programist.ru (Prav) Date: Sun, 28 Feb 2016 17:33:34 +0300 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <201602281002.00538.suy@badopi.org> References: <201602271726.32875.suy@badopi.org> <201602281002.00538.suy@badopi.org> Message-ID: <1113890422.20160228173334@programist.ru> > In the context of the previous example, I wasn't entirely sure if this was a > possibility: > 1. The QThread-derived instance is created in the thread of MainWindow. > 2. That instance is not moved to other thread, so it keeps the thread affinity > of the MainWindow. > 3. When a signal is emitted in run(), the thread affinity checked is somehow > "stored" in the instance, and since moveToThread did not change it, it's still > the same of MainWindow. > Now I have the confirmation that the 3rd point is wrong, which is good. :) Yes ... hard to expect from names that inside of QThread::run() method the current thread is not QThread::thread() ! I think the hardness of understanding "QThread-ing" comes from bad term like ... object "live in" thread. Which makes feel that object is like "placed inside" some bounds of QThread. Term "affinity" is not better as soon as (https://en.wikipedia.org/wiki/Processor_affinity): Affinity make so that "... process or thread will execute ONLY on the designated CPU ..." Like in this example makes people consider that QThread::run is executed by thread where QThread is "living in". Or very stragly to find out at some point that newly created QThread object (which is QObject) does not "lives in" newly created thread ... which can blow mind ... and many people start use QThreads in inapropriate way ... and this QThread-ing became one of hardest to get themes in Qt. But actually QObject is "living in all threads" (it is in the process memory) ... and ANY thread can call its methods. Better to think (and say) that object ASKed to execute all object's QUEUED "connections" (which are object's slots and events methods) by some thread (which is by default QThread::currentThread() at the moment of object creation) And I think it would saved many hours of understanding for many people if long ago someone called "moveToThread" method as "moveConnectionsToThread". Only reuest to execute queued Connections is "moved"! NOT the object itself (memory, data)! And even not the execution of all other methods. So it is very strange that this weak relation was called as "living in" or "affinity". In this thinking: In this example we see that QThread::run() method is not a slot (not a "connection") of QThread ... SO we should not expect that it is executed by thread where QThread-object registered its "connections" processing (which is original thread). That is why it is not QThread::thread(). Moreover ... even "connections" can be executed by ANY thread of the process just as regular methods of C++ language or by QObject::connect with Qt::DirectConnection flag. So in any QObject's code the current thread could be not a QObject::thread() but is QThread::currentThread() PS Alejandro, I get that you know all this but I was thinking that this remark could probably be helpfull for many others who scratch their heads because of "living in" questions like this. From jeanmichael.celerier at gmail.com Sun Feb 28 16:52:17 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Sun, 28 Feb 2016 16:52:17 +0100 Subject: [Interest] Display QML in a QGraphicsScene ? Message-ID: Hello, Is there an easy way to display QML elements in a traditional QGraphicsScene - QGraphicsView based application ? e.g. something that would be like a QGraphicsQMLItem. I tried this : QQuickView *view = new QQuickView(); view->setSource(QUrl("qrc:/DummyProcess.qml")); QWidget *container = QWidget::createWindowContainer(view, graphicsView); container->setMinimumSize(QSize{100, 100}); container->setMaximumSize(QSize{500, 500}); container->setFocusPolicy(Qt::TabFocus); QGraphicsProxyWidget * proxy = new QGraphicsProxyWidget(this); // "this" is a QGraphicsItem proxy->setWidget(container); view->show(); But alas, what it does is that it opens the QML in a new window next to my app. Best regards, Jean-Michaël Celerier -------------- next part -------------- An HTML attachment was scrubbed... URL: From nunosantos at imaginando.pt Sun Feb 28 17:39:04 2016 From: nunosantos at imaginando.pt (Nuno Santos) Date: Sun, 28 Feb 2016 16:39:04 +0000 Subject: [Interest] Can't grab keyboard from QWindow created with QWindow::fromWinId from HWND pointer Message-ID: <56D322A8.6050608@imaginando.pt> Hi, I'm trying to grab the keyboard input on a QWindow created with QWindow::fromWinId from a HWND pointer, in Windows. I simply can't! The HWND pointer is provided by another application as this windows is supposed to appear as a Tool window of the application. This is what I am doing: _window = QWindow::fromWinId((WId)ptr); _window->requestActivate(); _window->setKeyboardGrabEnabled(true); I have also tried the following without success: _widget = QWidget::createWindowContainer(_window); _widget->setFocus(); _widget->grabKeyboard(); What am I missing? Thx, Regards, Nuno From rjvbertin at gmail.com Sun Feb 28 17:39:14 2016 From: rjvbertin at gmail.com (=?ISO-8859-1?Q?Ren=E9_J=2EV=2E?= Bertin) Date: Sun, 28 Feb 2016 17:39:14 +0100 Subject: [Interest] [OS X] maintaining a list of own WIds Message-ID: <2516190.tM2cYetLJd@portia.local> Hi, I'm looking for a way to maintain my own registry of a running application's WId objects that doesn't require access to some central event handling function because it will be done from a plugin. Can this be done with a regular eventFilter or will I need a nativeEventFilter? 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. Thanks, René From tim_grove at sil.org Sun Feb 28 18:30:10 2016 From: tim_grove at sil.org (Timothy W. Grove) Date: Sun, 28 Feb 2016 17:30:10 +0000 Subject: [Interest] Deploying Applications on OS X Message-ID: <56D32EA2.9010401@sil.org> Fromhttp://doc.qt.io/qt-5/osx.html: /*Deploying Applications on OS X*/ /In general, Qt supports building on one OS X version and deploying to earlier or later OS X versions. You can build on 10.7 Lion and run the same binary on 10.6. The recommended way is to build on the latest version and deploy to an earlier OS X version. / Is this really true??? My experience is that I need to build on the earliest version I wish to support (10.6.8). My current workflow is to build the app on the earliest version and then construct the dmg and code sign on the latest! I'm developing with PyQt4/Qt5 and building with cx_Freeze, so that may lead to this different workflow... Best regards, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmaxera at gmail.com Sun Feb 28 18:42:11 2016 From: gmaxera at gmail.com (Gianluca) Date: Sun, 28 Feb 2016 17:42:11 +0000 Subject: [Interest] Deploying Applications on OS X In-Reply-To: <56D32EA2.9010401@sil.org> References: <56D32EA2.9010401@sil.org> Message-ID: <43C14822-7E3C-4F48-BBFD-C5016ACA9736@gmail.com> Il giorno 28/feb/2016, alle ore 17:30, Timothy W. Grove ha scritto: > From http://doc.qt.io/qt-5/osx.html: > > /*Deploying Applications on OS X*/ > /In general, Qt supports building on one OS X version and deploying > to earlier or later OS X versions. You can build on 10.7 Lion and > run the same binary on 10.6. The recommended way is to build on the > latest version and deploy to an earlier OS X version. > > / > > Is this really true??? My experience is that I need to build on the > earliest version I wish to support (10.6.8). My current workflow is to > build the app on the earliest version and then construct the dmg and > code sign on the latest! I'm developing with PyQt4/Qt5 and building with > cx_Freeze, so that may lead to this different workflow… On OS X there is a big difference between the SDK are you using to compile and the SDK version are you targeting. So, typically scenario is that you build always with the latest SDK on your machine (e.g: 10.9), but you target previous version (e.g: 10.6)… that means your binary will run on machines running 10.6 operating system but it can also use new features available in later version if availables. Ciao, Gianluca. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim_grove at sil.org Sun Feb 28 20:23:18 2016 From: tim_grove at sil.org (Timothy W. Grove) Date: Sun, 28 Feb 2016 19:23:18 +0000 Subject: [Interest] Deploying Applications on OS X In-Reply-To: <43C14822-7E3C-4F48-BBFD-C5016ACA9736@gmail.com> References: <56D32EA2.9010401@sil.org> <43C14822-7E3C-4F48-BBFD-C5016ACA9736@gmail.com> Message-ID: <56D34926.4020609@sil.org> I think when looking at Xcode I saw the option to target an older version, but any suggestions on how to do that working with the tools I do? PyQt4 and cx_Freeze? I've asked several times on the cx_Freeze list if it was possible but have never received a reply. Thanks. Best regards, Tim On 28/02/2016 17:42, Gianluca wrote: > > Il giorno 28/feb/2016, alle ore 17:30, Timothy W. Grove > > ha scritto: > >> Fromhttp://doc.qt.io/qt-5/osx.html: >> >> /*Deploying Applications on OS X*/ >> /In general, Qt supports building on one OS X version and deploying >> to earlier or later OS X versions. You can build on 10.7 Lion and >> run the same binary on 10.6. The recommended way is to build on the >> latest version and deploy to an earlier OS X version. >> >> / >> >> Is this really true??? My experience is that I need to build on the >> earliest version I wish to support (10.6.8). My current workflow is to >> build the app on the earliest version and then construct the dmg and >> code sign on the latest! I'm developing with PyQt4/Qt5 and building with >> cx_Freeze, so that may lead to this different workflow… > On OS X there is a big difference between the SDK are you using to > compile and the SDK version are you targeting. > So, typically scenario is that you build always with the latest SDK on > your machine (e.g: 10.9), but you target previous version (e.g: 10.6)… > that means your binary will run on machines running 10.6 operating > system but it can also use new features available in later version if > availables. > > Ciao, > Gianluca. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiago.macieira at intel.com Sun Feb 28 18:22:02 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Sun, 28 Feb 2016 09:22:02 -0800 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <1113890422.20160228173334@programist.ru> References: <201602281002.00538.suy@badopi.org> <1113890422.20160228173334@programist.ru> Message-ID: <8444731.PfikL99xOk@tjmaciei-mobl4> On domingo, 28 de fevereiro de 2016 17:33:34 PST Prav wrote: > to execute all object's QUEUED "connections" (which are object's slots and > events methods) by some thread (which is by default > QThread::currentThread() at the moment of object creation) That's the other way around. All event deliveries happen in a given thread. One particular type of event is the queued slot activation. > And I think it would saved many hours of understanding for many people if > long ago someone called "moveToThread" method as "moveConnectionsToThread". Which would be wrong, since it's a lot more than connections. And if you look at the other two event dispatcher event source (QSocketNotifier and QWinEventNotifier), moveEventDeliveryToThread() would also be incomplete. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From jagernicolas at legtux.org Mon Feb 29 05:40:20 2016 From: jagernicolas at legtux.org (jagernicolas at legtux.org) Date: Mon, 29 Feb 2016 04:40:20 +0000 Subject: [Interest] =?utf-8?q?how_QQmlProperty_works_=3F?= Message-ID: <61a8269a0268f93cc530b27192d68518@legtux.org> Hi, I dont understand how QQmlProperty works, consider this example : main.cpp : http://pastebin.com/B17uY2Av [1] MainForm.ui.qml : http://pastebin.com/N3JKnU2h [2] output : Property value: QVariant(int, 3) Property value: QVariant(int, 3) Property value: QVariant(double, 10) Property value: QVariant(double, 500) first, in the window the image isn't resized, it still has 10px. second, how can set and display with qDebug values like : fillMode: Image.Tile third, when using qcreator everytime I clicked on MainForm.ui.qml I got the window of design opened, if I click on edit there is a message that this file should only be edited trough the designer, ok but to be able to use findchild I have to set objectName. I haven't found how to do that in the designer. Personnaly I don't like to have the designer opened by default, I would like to get the edit mode opened by default. four, instead of using objectName, could we use id ? Regards, Nicolas Links: ------ [1] http://pastebin.com/B17uY2Av [2] http://pastebin.com/N3JKnU2h -------------- next part -------------- An HTML attachment was scrubbed... URL: From bo at vikingsoft.eu Mon Feb 29 13:14:46 2016 From: bo at vikingsoft.eu (Bo Thorsen) Date: Mon, 29 Feb 2016 13:14:46 +0100 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: References: Message-ID: <56D43636.1080205@vikingsoft.eu> Den 27-02-2016 kl. 07:15 skrev Syam: > > Hello, > > Inspired from the recent discussions on QThread, I have the following > question. > I have: > > class MyThread : public QThread > { > Q_OBJECT > //the constructor and other stuff > > signals: > void mySignal(); > > protected: > virtual void run() > { > while(true) > { > //do something > if(some_condition) emit mySignal(); > } > } > }; > > > void MainWindow::someFunction() > { > MyThread *thread = new MyThread; > connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), > Qt::QueuedConnection); > thread->start(); > } > > > ////////////////// > > Will the above code work fine? In myGuiSlot() I am typically > manipulating some widgets - setting the text of a QLabel etc. Don't ever do this. I don't subscribe to the idea that you should never subclass QThread yourself, but I think it's a very bad idea to subclass and use signals and slots. The reason is the discussion that followed in this thread - it's so hard to understand precisely what happens with the connected signals and slots. I usually tell people that QThread is a bridge between the creating and the created thread. It's not actually, but conceptually it helps them to realize that they should not assume they can understand the qobject thread affinity inside the object itself. If you use signals and slots in a thread object, you do this: QThread* thread = new QThread; MyObject* object = new MyObject; object->moveToThread(thread); thread->start(); If you don't and only do calculation, or use a queue or something to handle the communication with hardware, etc, then you can subclass QThread and do stuff in run(). (This part is where I disagree with the "you're doing it wrong" crowd.) This is safe because without signals and slots in there you don't use the thread affinity and you don't have a local event loop. Guys, this is only hard if you insist on doing something that experienced people say you should stay away from. The OP thought the MyObject should create it's own thread. No, that's wrong. Accept it and move on. Or create a wrapper object around it if you must encapsulate it. Bo Thorsen, Director, Viking Software. -- Viking Software Qt and C++ developers for hire http://www.vikingsoft.eu From pr12og2 at programist.ru Mon Feb 29 14:37:46 2016 From: pr12og2 at programist.ru (Prav) Date: Mon, 29 Feb 2016 16:37:46 +0300 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <56D43636.1080205@vikingsoft.eu> References: <56D43636.1080205@vikingsoft.eu> Message-ID: <26828505.20160229163746@programist.ru> > Den 27-02-2016 kl. 07:15 skrev Syam: >> >> Hello, >> >> Inspired from the recent discussions on QThread, I have the following >> question. >> I have: >> >> class MyThread : public QThread >> { >> Q_OBJECT >> //the constructor and other stuff >> >> signals: >> void mySignal(); >> >> protected: >> virtual void run() >> { >> while(true) >> { >> //do something >> if(some_condition) emit mySignal(); >> } >> } >> }; >> >> >> void MainWindow::someFunction() >> { >> MyThread *thread = new MyThread; >> connect(thread, SIGNAL(mySignal()), this, SLOT(myGuiSlot()), >> Qt::QueuedConnection); >> thread->start(); >> } >> >> >> ////////////////// >> >> Will the above code work fine? In myGuiSlot() I am typically >> manipulating some widgets - setting the text of a QLabel etc. > Don't ever do this. I don't subscribe to the idea that you should never > subclass QThread yourself, but I think it's a very bad idea to subclass > and use signals and slots. Why you so easily mixed "signals and slots" in this statement. Signals are NOT slots ... so if slots in subclassed from QThread object usually gives not what people naturally expect, it does not mean that signals are dangerous too. Signals are just methods like any user's calculation code. What is wrong with them? So without argumentation I do not get why signals in QThread::run() is better to avoid. From thiago.macieira at intel.com Mon Feb 29 17:48:07 2016 From: thiago.macieira at intel.com (Thiago Macieira) Date: Mon, 29 Feb 2016 08:48:07 -0800 Subject: [Interest] Emitting signal from QThread::run() In-Reply-To: <26828505.20160229163746@programist.ru> References: <56D43636.1080205@vikingsoft.eu> <26828505.20160229163746@programist.ru> Message-ID: <3284049.nOB1HIiKKO@tjmaciei-mobl4> On segunda-feira, 29 de fevereiro de 2016 16:37:46 PST Prav wrote: > Why you so easily mixed "signals and slots" in this statement. > Signals are NOT slots ... so if slots in subclassed from QThread object > usually gives not what people naturally expect, it does not mean that > signals are dangerous too. > > Signals are just methods like any user's calculation code. What is wrong > with them? So without argumentation I do not get why signals in > QThread::run() is better to avoid. The argument is *because* it confuses people. You're right in your statement that signals are not slots and that the code actually works. But people keep asking about the thread affinity of the sender class (the QThread-derived one), which is irrelevant in the context. It's not a matter of "works". It's a matter of "confusing". -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center From john at wavemetrics.com Mon Feb 29 18:00:18 2016 From: john at wavemetrics.com (John Weeks) Date: Mon, 29 Feb 2016 09:00:18 -0800 Subject: [Interest] [OS X] maintaining a list of own WIds In-Reply-To: <2516190.tM2cYetLJd@portia.local> References: <2516190.tM2cYetLJd@portia.local> Message-ID: <6576F3C5-5408-430A-835E-29549C02962F@wavemetrics.com> > 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. From bma at ro.ru Thu Feb 18 10:01:14 2016 From: bma at ro.ru (=?koi8-r?B?7cHL08nNIOLF097F0sXXztnI?=) Date: Thu, 18 Feb 2016 09:01:14 -0000 Subject: [Interest] C++/QML Sequence Type to JavaScript Array Message-ID: <1455786067.941729.27413.30477@mail.rambler.ru> In docs http://doc.qt.io/qt-5/qtqml-cppintegration-data.html mentioned: "Certain C++ sequence types are supported transparently in QML as JavaScript Array types. In particular, QML currently supports: QList QList QList QList and QStringList QList Other sequence types are not supported transparently, and instead an instance of any other sequence type will be passed between QML and C++ as an opaque QVariantList." Looks like that "opaque conversion" doesn't work: class MyData : public QObject { Q_OBJECT Q_PROPERTY(QList path READ path WRITE setPath NOTIFY pathChanged) public: QList path() { return _path; } ... MyData object filled with some data and exposed as context property to QML. At QML i imported QtPositioning, so QGeoCoordinate refers to coordinate QML basic type, but console.log(myData.path) prints QVariant(QList) console.log(myData.path) prints undefined - there is no sequence, no length. Is it possible to expose QList sequence to QML, where Type known by meta object system and refers to QML basic type provided by an QtQuick module? I know that i can expose C++ property of type QVariantList , but what is that opaque conversion mentioned in docs. Maxim Beschecherevnykh From oyviba at gmail.com Thu Feb 25 10:38:17 2016 From: oyviba at gmail.com (=?UTF-8?Q?=C3=98yvind_Bakken?=) Date: Thu, 25 Feb 2016 09:38:17 -0000 Subject: [Interest] Qt3D face culling Message-ID: Hi, we are developing a desktop application with 3D graphics using Qt3D. We have run into some issues when using the Qt3DRender.CullFace settings in the Qt3DRender.StateSet module. Basically we have an open surface which was correctly rendering the front, but not the back face. We then added the Qt3DRender.CullFace settings like this (QML): Scene3D { ..... ..... // Top-level entity entity: Qt3DCore.Entity { ..... ..... // Simple framegraph that just renders the scene from the camera components: [ Qt3DRender.FrameGraph { activeFrameGraph: Qt3DRender.Viewport { rect: Qt.rect(0, 0, 1, 1) // From Top Left clearColor: "transparent" Qt3DRender.CameraSelector { camera: camera Qt3DRender.ClearBuffer { buffers : Qt3DRender.ClearBuffer.ColorDepthBuffer Qt3DRender.StateSet { Qt3DRender.CullFace { //mode: Qt3DRender.CullFace.FrontAndBack } } } } } } ] } //Top-level entity } //Scene3D The obvious first strange thing here is that we don't even have to add the mode setting of the CullFace to make it work - even though the line is commented out, both the front and back face is rendered correctly. The other issue is that when rotating the camera, the depth mode seems to be broken - we have two objects in the scene, and now one of them is always in the front of the other when rotating 360 degrees. It seems to us that we are either not using the correct way of changing culling settings, or that when adding the Qt3DRender.StateSet part this overwrites other settings as well, related to depth etc. Any ideas? Thanks in advance:) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stefan.Walter at lisec.com Tue Feb 23 06:27:44 2016 From: Stefan.Walter at lisec.com (Walter Stefan) Date: Tue, 23 Feb 2016 05:27:44 -0000 Subject: [Interest] QJSEngine replacement for QScriptEngine misses newFunction Message-ID: Hi, I am looking into migrating my code to QJSEngine, because of the deprecation of the QScriptEngine (QtScript). As we have used the functionality of newFunction very extensive and all related scripts are depending on this, the newFunction in QJSEngine is for us mandatory or something that creates and equivalent result. How do I currently map a native C++ class member function to the engine: QScriptValue func_sqrt = m_engine->newFunction(sqrt, liEngine); m_engine->globalObject().setProperty("sqrt", func_sqrt, QScriptValue::ReadOnly | QScriptValue::Undeletable); This is an example of a native function: QScriptValue ScriptModuleMath::sqrt(QScriptContext *context, QScriptEngine *engine, void *arg) { Q_UNUSED(engine) Q_UNUSED(arg) if (context->argumentCount()!=1) { return context->throwError( QScriptContext::SyntaxError, "sqrt(...): illegal number of arguments."); } else if (!context->argument(0).isNumber()) { return context->throwError( QScriptContext::SyntaxError, "sqrt(...): argument 1 is not a number."); } return qSqrt(context->argument(0).toNumber()); } And in this way. I can use it then in the script: value = sqrt(4); I actually don't want to map a whole QObject, because that would require a call like this: value = MyMath.sqrt(4); Is there any way to achive in QJSEngine the same result as I do within the QScriptEngine? Best Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: