Re: [Interest] QtThread
Thanks everyone I am beginning to understand -Original Message- From: interest-bounces+graham.labdon=avalonsciences@qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences@qt-project.org] On Behalf Of Sze Howe Koh Sent: 13 January 2014 15:27 To: interest@qt-project.org Subject: Re: [Interest] QtThread On 13 January 2014 18:26, Etienne Sandré-Chardonnal etienne.san...@m4x.org wrote: Hi, As Andrey pointed out, there is not a single way. But if you want to use a QThread for running QObjects with its event loop, the most simple way is not to subclass, and moveToThread. This is well explained here: http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/ http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthr eads-the-full-explanation/ To balance things out, here's a direct response to Etienne's first link: http://woboq.com/blog/qthread-you-were-not-doing-so-wrong.html The correct method depends on what you want to achieve. I wrote (most of) this page to compare/contrast all the different ways to do parallel processing in Qt, and try to help readers choose the best way for their application: http://qt-project.org/doc/qt-5/threads-technologies.html (suggestions for improvements are welcome!) Regards, Sze-Howe ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Question about reading glsl shader source from a QResource using compression
I think the example is just doing it wrong, it should instead load the resource file contents using QFile into two QByteArrays into the ctor and then return the QByteArrays' contents there. Right. Thanks for the feedback! I'll use QFile to be sure, in case compression is enabled. Cheers! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] help with c++ qml plugin
Hi all, I made a QML plugin, which gives access to X11 window's. windowlist, active window and actions for windows like closeWindow(winID) etc. I don't know how to properly implement the signals and slot so that the active window and the window list gets updated (e.g a new window appears or one is closed). Can you help me maybe with the activeWIndow exapmple: Q_PROPERTY(int activeWindow READ activeWindow WRITE setActiveWindow NOTIFY activeWindowChanged) activeWindow reads the actual Window, setAtiveWindow let's me change it from .qml but I don't know how to properly implement the NOTIFY Signal since the active window will be changed by the window manager etc too. Thanks in advance. Damian ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] how can we use MongoDB with Qt QML
I need to use mongoDB no-sql database with my QML project. can I get some guide on this?i have downloaded the zip file of mongodb for win32 bit. For using SQL database like mysql and sqlite we need to configure QT for these databases. Do I need to do similar configuration for using mongoDB?. Any help is highly appreciated. -- Cordially Sujan ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] how can we use MongoDB with Qt QML
I never tsted MongoDB, but a simple search with google like this https://www.google.es/search?q=mongodb+qt+driveroq=mongodb+with +qtaqs=chrome.3.69i57j0l3.10824j0j1client=ubuntu-browsersourceid=chromeie=UTF-8 In the first position, it's own C++ driver... http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-cpp-driver/#getting-started-with-cpp-driver Just after some reading, you have a pre-implemented solution http://qt-project.org/forums/viewthread/4574 Read Enjoy. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt laptop stickers
I can post you some, email me your postal address. For wide scale availability, it is preferred to stop by the Qt booth in some event, for example DevDays. Yours, Tuukka From: Curtis Mitch Sent: tiistaina 14. tammikuuta 2014 13.17 To: Bob Hood; Juergen Bocklage-Ryannel; interest@qt-project.org; Turunen Tuukka Subject: Re: [Interest] Qt laptop stickers Tuukka? :) On 01/13/2014 04:55 PM, Bob Hood wrote: On 1/13/2014 6:57 AM, Juergen Bocklage-Ryannel wrote: On 07.01.14 05:51, Николай Шатохин wrote: Hello. Does anyone have a Qt laptop stickers? Can you sell me some? Best regards, Nick ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest Hmm, I think I went out of them. At least haven't seen them for a while. If a DIGIA person is listening. Would be great to have some general merchandising of Qt. E.g. Qt shirts, Qt mugs, Qt stickers, Qt-Teddy, Qt-Mousepad, etc... There should be some companies around which offer these kind of merchandise-services. DIGIA owns the copyright to the Qt-logo and trademark, as far as I know. / juergen I'm pretty sure there was merchandising when Nokia owned Qt. I still have my (really rather cool) Qt pen, which I think I picked up at a past SIGGRAPH, that has the qt.nokia.com URL on it. I would agree: It would be nice to have some product merchandising (pens, mouse pads, stickers, etc.) to be able to show our pride in this fantastic product. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] how can we use MongoDB with Qt QML
Thanks Jordi your links are useful I appreciate it. Thanks Sujan On Tue, Jan 14, 2014 at 4:07 PM, Jordi Pujol Foyo pisoengra...@gmail.comwrote: I never tsted MongoDB, but a simple search with google like this https://www.google.es/search?q=mongodb+qt+driveroq=mongodb+with +qtaqs=chrome.3.69i57j0l3.10824j0j1client=ubuntu-browsersourceid=chromeie=UTF-8 In the first position, it's own C++ driver... http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-cpp-driver/#getting-started-with-cpp-driver Just after some reading, you have a pre-implemented solution http://qt-project.org/forums/viewthread/4574 Read Enjoy. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Cordially Sujan ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] whether a color image can SAFELY be converted to a grayscale image
In the Image Formats part of QImage doc says The allGray() and isGrayscale() functions tell whether a color image can safely be converted to a grayscale image. what does safely mean here ?___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Draw ellipse (and etc.) the same way as cosmetic QPen
Is there a possibility to draw something irrespectively to scene transformations such as cosmetic QPen? I've tried to approaches but none brings me to a success. I have some scene that may contain a polyline with vertices represented by bold dots. While polyline and thus coordinates of dots should respect scene scaling, I don't want the size of dots to change. Here's the Polyline's imlementation of paint() method (Polyline inherits QGraphicsPolygonItem): void PolylineItem::paint(QPainter* const painter, const QStyleOptionGraphicsItem* const option, QWidget* const widget) { Q_UNUSED(option); Q_UNUSED(widget); painter-setPen(pen()); painter-setBrush(brush()); painter-drawPolyline(polygon()); #if 0 if (polygon().size() m_points.size()) { for (int i = m_points.size(); i polygon().size(); ++i) { auto* const point = new QGraphicsEllipseItem(this); point-setPen(pen()); point-setBrush(brush()); //point-setFlag(QGraphicsItem::ItemIgnoresTransformations); m_points.append(point); } } else if (polygon().size() m_points.size()) { const int count = m_points.size() - polygon().size(); for (int i = 0; i count; ++i) { delete m_points.takeLast(); } } const qreal r = pen().widthF() * POINT_RADIUS_RATIO; for (int i = 0; i m_points.size(); ++i) { const QPointF c = polygon().at(i); m_points[i]-setRect(c.x() - r, c.y() - r, 2 * r, 2 * r); } #else const qreal r = pen().widthF() * POINT_RADIUS_RATIO; foreach (const QPointF point, polygon()) { painter-drawEllipse(point, r, r); } #endif } The code between #else and #endif directives is the first straightforward way I've tried. The points are scaled in size. The part between #if and #else behaves the same when point-setFlag() is commented out. If I enable this invokation, the points are constantly of the same size, as I want it, but their positions are scaled outside the polyline. In fact, they are not scaled, but the whole scene with the polyline itself are scaled, so it looks like the dots are moving outside. Can't figure out what to do. Asking for help. Regards, Dmitrii. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Draw ellipse (and etc.) the same way as cosmetic QPen
Have you tried adding child GraphicsItems for each of the dots and setting the flag QGraphicsItem::ItemIgnoresTransformations? That should do the trick. Ian. On 14/01/14 12:11, Dmitrii Volosnykh wrote: Is there a possibility to draw something irrespectively to scene transformations such as cosmetic QPen? I've tried to approaches but none brings me to a success. I have some scene that may contain a polyline with vertices represented by bold dots. While polyline and thus coordinates of dots should respect scene scaling, I don't want the size of dots to change. Here's the Polyline's imlementation of paint() method (Polyline inherits QGraphicsPolygonItem): void PolylineItem::paint(QPainter* const painter, const QStyleOptionGraphicsItem* const option, QWidget* const widget) { Q_UNUSED(option); Q_UNUSED(widget); painter-setPen(pen()); painter-setBrush(brush()); painter-drawPolyline(polygon()); #if 0 if (polygon().size() m_points.size()) { for (int i = m_points.size(); i polygon().size(); ++i) { auto* const point = new QGraphicsEllipseItem(this); point-setPen(pen()); point-setBrush(brush()); //point-setFlag(QGraphicsItem::ItemIgnoresTransformations); m_points.append(point); } } else if (polygon().size() m_points.size()) { const int count = m_points.size() - polygon().size(); for (int i = 0; i count; ++i) { delete m_points.takeLast(); } } const qreal r = pen().widthF() * POINT_RADIUS_RATIO; for (int i = 0; i m_points.size(); ++i) { const QPointF c = polygon().at(i); m_points[i]-setRect(c.x() - r, c.y() - r, 2 * r, 2 * r); } #else const qreal r = pen().widthF() * POINT_RADIUS_RATIO; foreach (const QPointF point, polygon()) { painter-drawEllipse(point, r, r); } #endif } The code between #else and #endif directives is the first straightforward way I've tried. The points are scaled in size. The part between #if and #else behaves the same when point-setFlag() is commented out. If I enable this invokation, the points are constantly of the same size, as I want it, but their positions are scaled outside the polyline. In fact, they are not scaled, but the whole scene with the polyline itself are scaled, so it looks like the dots are moving outside. Can't figure out what to do. Asking for help. Regards, Dmitrii. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify the sender and delete the original. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Draw ellipse (and etc.) the same way as cosmetic QPen
Have you tried adding child GraphicsItems for each of the dots and setting the flag QGraphicsItem::ItemIgnoresTransformations? That should do the trick. Ian. Ian, I pasted the code from my application from which you can see that I am aware of QGraphicsItem::ItemIgnoresTransformations flag. The problem was that I did not set the position of child items relative to their parent thus having (0, 0) by default. Having that done I also had to adjust drawing relative to child's local coordinate system. Thank for input, Ian. And sorry for false alarm, everybody. Regards, Dmitrii. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] [Android] Profiling QML application
On 13 January 2014 20:08, Koehne Kai kai.koe...@digia.com wrote: -Original Message- From: interest-bounces+kai.koehne=digia@qt-project.org [mailto:interest-bounces+kai.koehne=digia@qt-project.org] On Behalf Of Ben Lau Sent: Sunday, January 12, 2014 5:53 PM To: interest@qt-project.org Subject: [Interest] [Android] Profiling QML application Hi , I got a performance problem in loading QML in Android . Therefore I would like to run profiler on QML itself. However, when I launch the QML profiler within QT creator. The process hang on : D/Qt (14973): qtcpserverconnection.cpp:173 (voidQTcpServerConnection::listen()): QML Debugger: Waiting for connection on port 61428... That's with Qt Creator 3.0? Please file a bug ... Anyhow, as a 'workaround' you should be able to profile by launching the app yourself with e.g. -qmljsdebugger=port:61428,block argument, and then connect from Qt Creator with Analyze-Qml Profiler(external) ... Regards Kai Hi Kai, Thanks for your reply. Then I have another question.. how can I assign the argument to an Android application? I have tried to use `adb shell` and launch the application by : $ am start -n mypackage/org.qtproject.qt5.android.bindings.QtActivity -e applicationArguments '-qmljsdebugger=port:61428' But it is still not working. The result of QApplication::arguments() don't even contains the `-qmljsdebugger=port:61428` parameter. (p.s I will file a bug for Qt Creator) ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] whether a color image can SAFELY be converted to a grayscale image
It means without losing any [color] information. On Jan 14, 2014 3:59 PM, iMath 2281570...@qq.com wrote: In the Image Formats part of QImage doc says The allGray() and isGrayscale() functions tell whether a color image can safely be converted to a grayscale image. what does safely mean here ? ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Use internationalisation in qt4 with QWS
Hi, For an application, we need to be able to type from a virtual keyboard in different languages, supporting Japanese, Chinese, Korean, Latin, Cyrillic, Arabian, and so on. The problem is that we don't have X since we use QWS. We need also to program the language from our application. Does someone have some hints? Is this possible? Thanks so much Regards, Simone ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt laptop stickers
I will stop by and bring a beer:-) What about using a service like (http://www.zazzle.com/google+gifts), so that the community could order them and create additional marketing for Qt and DIGIA. Maybe also a contest for best designed merchandise. Not sure if this is possible. / juergen On 14.01.14 12:28, Turunen Tuukka wrote: I can post you some, email me your postal address. For wide scale availability, it is preferred to stop by the Qt booth in some event, for example DevDays. Yours, Tuukka *From: *Curtis Mitch *Sent: *tiistaina 14. tammikuuta 2014 13.17 *To: *Bob Hood; Juergen Bocklage-Ryannel; interest@qt-project.org; Turunen Tuukka *Subject: *Re: [Interest] Qt laptop stickers Tuukka? :) On 01/13/2014 04:55 PM, Bob Hood wrote: On 1/13/2014 6:57 AM, Juergen Bocklage-Ryannel wrote: On 07.01.14 05:51, Николай Шатохин wrote: Hello. Does anyone have a Qt laptop stickers? Can you sell me some? Best regards, Nick ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest Hmm, I think I went out of them. At least haven't seen them for a while. If a DIGIA person is listening. Would be great to have some general merchandising of Qt. E.g. Qt shirts, Qt mugs, Qt stickers, Qt-Teddy, Qt-Mousepad, etc... There should be some companies around which offer these kind of merchandise-services. DIGIA owns the copyright to the Qt-logo and trademark, as far as I know. / juergen I'm pretty sure there was merchandising when Nokia owned Qt. I still have my (really rather cool) Qt pen, which I think I picked up at a past SIGGRAPH, that has the qt.nokia.com URL on it. I would agree: It would be nice to have some product merchandising (pens, mouse pads, stickers, etc.) to be able to show our pride in this fantastic product. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt laptop stickers
Tuukka: Can you send me some Qt stickers, I would be proud having the first Qt-fashion Laptop in Cuba. Zip code: 72 400 Here is my address: Camaguey, Cuba. Minas, Cristander street number 26. Thanks III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Use internationalisation in qt4 with QWS
14.01.2014, 22:58, Simone cjb.sw.nos...@gmail.com: Hi, For an application, we need to be able to type from a virtual keyboard in different languages, supporting Japanese, Chinese, Korean, Latin, Cyrillic, Arabian, and so on. The problem is that we don’t have X since we use QWS. We need also to program the language from our application. 1. In Qt internationalisation is not related to X at all. 2. In our embedded application we implement virtual keyboard as a regular widget with interchangable lists of onscreen keys -- Regards, Konstantin ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest