Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Filip Piechocki
I don't know how you produce the video frames, but check that the software you are using might be able to produce OpenGL texture directly (not the buffer data). If not then here are some useful links: http://stackoverflow.com/questions/9863969/updating-a-texture-in-opengl-with-glteximage2d http://w

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread André Somers
Op 07/03/2016 om 19:00 schreef william.croc...@analog.com: QDataStream out2(&file); // and module A write those datas to a file. out2 << bai.size(); out2 << bai; All of the following is IMHO: I think that if you are going to read the size back as an 'int' you should i

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
> > Sure, you can look and see that the size() of a QByteArray returns > an 'int', but that is only as of today. You should get into the habit > of controlling the types written to QDataStreams. > That is a nice habit of programming tip! Thank you Bill, I will keep in my mind for sure :) 2016-03-

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
Thank you for writing Thiago, > The problem is here. You've removed the bug from the sample source. So we > can't help you. Well I might made a mistake, I am kind of a amatuer programmer but on the real code, the problem is also same. I mean after I read stream to string, string is empty. But f

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
> > QByteArray bai; > > out2 << bai.size(); > > out2 << bai; > Here you wrote out an int and a QByteArray, so the file contains 4 bytes > for the int "bai.size()" (value of 22), and then because of how QDataStream > serializes QByteArrays, another 4 bytes for the size of the QByteArray > (still

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Jani Tykka
I'm creating the image from buffer which is unsigned char buffer containing video frame data QImage( buffer, width, height, QImage::Format_RGB32 ); On Mon, Mar 7, 2016 at 10:05 PM, Filip Piechocki wrote: > > How are you generating those images? What do they represent? > > On Mar 7, 2016 20:55, "

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 20:37:24 PST, Jason H escreveu: > I now understand that is wrong, that it is just looking it up in a > translation table, and that "(s)" does not specify the string alteration. I > would assume then that the 3-parameter tr() call is what signifies that it >

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Filip Piechocki
How are you generating those images? What do they represent? On Mar 7, 2016 20:55, "Jani Tykka" wrote: > Images are passed from another thread in rate 15-30 fps. Is there an > example available how to achieve Image to OpenGL texture and use it in > scene graph? > > On Mon, Mar 7, 2016 at 5:11 PM,

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Jani Tykka
Images are passed from another thread in rate 15-30 fps. Is there an example available how to achieve Image to OpenGL texture and use it in scene graph? On Mon, Mar 7, 2016 at 5:11 PM, Filip Piechocki wrote: > And where it comes from? How frequent it happens? Probably the best thing > here would

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Jason H
It is up to the person filling the > translation file with translations (including the one for English) to > make sure that both versions of the definitive string are provided in > the .ts file. > > André André and Thiago, thanks for clarifying that. I figured there was some type of string

Re: [Interest] Translating plural with is/are

2016-03-07 Thread André Somers
Op 07/03/2016 om 20:25 schreef André Somers: Op 07/03/2016 om 19:56 schreef Jason H: If you provide a translation file, the message with %n will be translated according to the language's plural rules. For English, you'll have two translations for the same source message. "At least one

Re: [Interest] Translating plural with is/are

2016-03-07 Thread André Somers
Op 07/03/2016 om 19:56 schreef Jason H: If you provide a translation file, the message with %n will be translated according to the language's plural rules. For English, you'll have two translations for the same source message. "At least one upper case character is required" (a)

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 20:16:48 PST, Jason H escreveu: > Please provide the tr line as even after re-reading I don't think it (is/are > selection) can be done, and please reference where the docs cover that > syntax. > > To put it in s more documentation example way: > Example:

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 19:56:04 PST, Jason H escreveu: > > If you provide a translation file, the message with %n will be translated > > according to the language's plural rules. For English, you'll have two > > translations for the same source message. > > > > "At least one

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Giuseppe D'Angelo
Il 07/03/2016 20:16, Jason H ha scritto: I do not see how I can supply a plural and non-plural string, or a string that works in both contexts and included is/are or was/were, respectively. By then using lupdate to extract translations, linguist to provide them, lrelease to compile them, and

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Jason H
> > Ok I'm getting there, but how do I specify this string (a) or that string > > (b)? > > What's the qsTr() line look like? > > qsTr( ? ) > > http://doc.qt.io/qt-5/i18n-plural-rules.html > > and > > http://doc.qt.io/qt-5/i18n-source-translation.html > > -> chapter Handling Plurals Yeao, read

Re: [Interest] Android services

2016-03-07 Thread Jason H
I am willing to write as much android code as I need That is to say I was hoping to extend QtActivity, and have the QtActivity talk to the service as if it were a proper Android app, as well as code the service in Android SDK. I have the luxury of being able to mostly coordinate things through t

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Till Oliver Knoll
> Am 07.03.2016 um 19:56 schrieb Jason H : > > >> >> If you provide a translation file, the message with %n will be translated >> according to the language's plural rules. For English, you'll have two >> translations for the same source message. >> >>"At least one upper case character i

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Jason H
> > If you provide a translation file, the message with %n will be translated > according to the language's plural rules. For English, you'll have two > translations for the same source message. > > "At least one upper case character is required" (a) > "At least %n upper case chara

Re: [Interest] Android services

2016-03-07 Thread Pendleton, Corey
Yeah, we have the same challenge. Our current workaround is to launch our Activity as a sticky activity, and then push it to the background after it starts processing events. Hopefully, that keeps it invisible to device users at startup, but gets our service running in-process. It's an ugly hack

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
QDataStream out2(&file); // and module A write those datas to a file. out2 << bai.size(); out2 << bai; All of the following is IMHO: I think that if you are going to read the size back as an 'int' you should insure that an 'int' is written in the first place: out2 <<

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 18:44:17 PST, Jason H escreveu: > > Sent: Monday, March 07, 2016 at 12:38 PM > > From: "Thiago Macieira" > > To: interest@qt-project.org > > Subject: Re: [Interest] Translating plural with is/are > > > > Em segunda-feira, 7 de março de 2016, às 18:23:20 PS

Re: [Interest] Android services

2016-03-07 Thread Jason H
Thanks, but 1. I need it now. 2. "The Android Application running can now have a QtActivity or a QtService, but having both in the same process is not supported." Both of which are deal-breakers. It's be nice to know if I can work around the limitation of the patch? > Sent: Monday, March 07

Re: [Interest] Android services

2016-03-07 Thread Pendleton, Corey
You might find this interesting: https://bugreports.qt.io/browse/QTBUG-37221 According to the patch associated with that report: https://codereview.qt-project.org/#/c/149018/ this feature may be available to you with Qt 5.7. Corey -Original Message- From: m...@rpzdesign.com [mailto:m...

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Jason H
> > > > Supply a translation file for en_US. > > I'm not sure I follow. I don't see anything that allows me to tell it to > select one for singular or the other? I think I'm missing something? I'd like to **NOT** have a redundant pluralisation check, which might not match the language's plura

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Jason H
> Sent: Monday, March 07, 2016 at 12:38 PM > From: "Thiago Macieira" > To: interest@qt-project.org > Subject: Re: [Interest] Translating plural with is/are > > Em segunda-feira, 7 de março de 2016, às 18:23:20 PST, Jason H escreveu: > > While Qt handles certain phrases like: > > "Use %n upper ca

Re: [Interest] Translating plural with is/are

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 18:23:20 PST, Jason H escreveu: > While Qt handles certain phrases like: > "Use %n upper case character(s)" > > adequately, if phrased slightly differently: > > "At least %n upper case character(s) is required" > breaks because the translation is: > 1. "At

Re: [Interest] Error: /opt/qt-5.5.0/lib/libQt5*: undefined reference

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 21:23:11 PST, Nilesh Kokane escreveu: > While building application against Qt-5.5.0 throws the following error: > > $make > /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to > `QOpenGLExtensions::flushShared()' You probably have /usr/lib/libQt5G

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Thiago Macieira
Em segunda-feira, 7 de março de 2016, às 15:41:49 PST, Sina Dogru escreveu: > int main() > { > // module A creates a byte array > QByteArray bai; > QDataStream out(&bai, QIODevice::WriteOnly); > out << QString("A QString"); // writes some information on it > > // passing bai to

Re: [Interest] Android services

2016-03-07 Thread Jason H
Yes, a skeleton app is the next step. The problem with the Jobs api is it's api availability, we would either need to use the compat library or up our minimum specs (4.2, API 17) I'd also like to get services working in Qt in general. > Sent: Friday, March 04, 2016 at 6:50 PM > From: "m...@rpzd

[Interest] Translating plural with is/are

2016-03-07 Thread Jason H
While Qt handles certain phrases like: "Use %n upper case character(s)" adequately, if phrased slightly differently: "At least %n upper case character(s) is required" breaks because the translation is: 1. "At least 1 upper case character is required" 2a. "At least 2 upper case characters is requ

[Interest] Error: /opt/qt-5.5.0/lib/libQt5*: undefined reference

2016-03-07 Thread Nilesh Kokane
While building application against Qt-5.5.0 throws the following error: $make /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to `QOpenGLExtensions::flushShared()' /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to `QFontDatabase::isPrivateFamily(QString const&) const' [snip]

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Murphy, Sean
Your issue boils down to the fact that QByteArray != QString combined with how QDataStream serializes data. According to the documentation for serializing data through a QDataStream (http://doc.qt.io/qt-5/datastreamformat.html) and your code, you have these two things involved: QString If the st

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
Tony and William, My sincere thanks for your answer, it really helped me understand the issue and saved my day :). By the way here is the final code, #include #include #include #include int main() { QFile file("file.dat"); file.open(QIODevice::WriteOnly); QByteArray bai; {

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
On 03/07/2016 09:35 AM, Sina Dogru wrote: Well but, I am writing a QString to QByteArray, QByteArray bai; QDataStream out(&bai, QIODevice::WriteOnly); out << QString("A QString"); And writing an 'int' and QByteArray which a QString written file.open(QIODevice::WriteOnly); QDataStream out2(&fil

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Filip Piechocki
And where it comes from? How frequent it happens? Probably the best thing here would be to generate this image as an OpenGL texture and then use in the Qt's scene graph. On Mon, Mar 7, 2016 at 4:04 PM, Jani Tykka wrote: > Yes, the image is always changed when the update is invoked. > > On Mon, M

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Jani Tykka
Yes, the image is always changed when the update is invoked. On Mon, Mar 7, 2016 at 4:43 PM, Filip Piechocki wrote: > Hi, > > Why are you re-creating the texture on every node update? Does the > m_Renderer->getImage() really changes? My first guess would be that the > texture creation from image

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Filip Piechocki
Hi, Why are you re-creating the texture on every node update? Does the m_Renderer->getImage() really changes? My first guess would be that the texture creation from image is the most costly part here (uploading the texture to GPU?) and I would do this only if necessary (the image really changes).

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
Well but, I am writing a QString to QByteArray, QByteArray bai; QDataStream out(&bai, QIODevice::WriteOnly); out << QString("A QString"); And writing an 'int' and QByteArray which a QString written file.open(QIODevice::WriteOnly); QDataStream out2(&file); // and module A write those datas to a f

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
On 03/07/2016 09:19 AM, Sina Dogru wrote: 2016-03-07 15:51 GMT+02:00 william.croc...@analog.com mailto:william.croc...@analog.com>>: Some tool kits use a buffer in their version of QDataStream. You can not in general be sure that anything has actuall

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
2016-03-07 15:51 GMT+02:00 william.croc...@analog.com < william.croc...@analog.com>: > Some tool kits use a buffer in their version of QDataStream. > You can not in general be sure that anything has actually been > written to 'bai' here because 'out' is still alive. > So I would be sure if I writ

Re: [Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Giuseppe D'Angelo
Il 07/03/2016 15:04, Jani Tykka ha scritto: It seems that computers with separate GPU there is a decent amount of CPU utilised. We are running into problems if the machine lacks GPU, then with large images the CPU usage grows drastically. Any suggestions how to improve large image painting on QQu

[Interest] Quick2 OpenGL inefficiency?

2016-03-07 Thread Jani Tykka
Hi, We are rendering QImages on QQuickItem as following: QSGNode * DisplayItem::updatePaintNode( QSGNode * node, UpdatePaintNodeData * /*data*/ ) { QSGSimpleTextureNode * n = static_cast< QSGSimpleTextureNode* >( node ); if ( !n ) n = new QSGSimpleTextureNode;

Re: [Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread william.croc...@analog.com
int main() { // module A creates a byte array QByteArray bai; QDataStream out(&bai, QIODevice::WriteOnly); out << QString("A QString"); // writes some information on it Some tool kits use a buffer in their version of QDataStream. You can not in general be sure that anything has actually been

[Interest] reading from and writing to a file with QDataStream

2016-03-07 Thread Sina Dogru
Hello, I am trying to read from and write to a file. But to do this, I use QByteArray to pass it between some of the modules. But seems like things does not work like I predicted. Simply, on module A, I write some informations to a QByteArray. Then I pass it to module B which writes to a file, an