Re: [Interest] Could I use V8 engine directly in QT?

2022-12-08 Thread Max Paperno
Hi Bob, What is this v8 you're referring to (in terms of QJSEngine I mean)? Can you explain "it used" further? It's possible, in many/most cases, to extend or even replace the built-in JS types in QJSEngine (not QQmlEngine). Either with pure JS implementations or C++ or a mix. I'm not sure

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Max Paperno
On 6/13/2021 1:08 PM, Thiago Macieira wrote: That was a toy example application. Most applications will post in event to something happening, so the event loop has already started. But we weren't discussing "most applications." The OP asked how to handle a network request and presented an

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Max Paperno
On 6/13/2021 11:02 AM, Thiago Macieira wrote: On Friday, 11 June 2021 21:05:08 PDT Max Paperno wrote: Insert a "return" here and let your slot be called when the time is right. Right, too much Python lately... "should" have been `processEvents()` which is when I realized

Re: [Interest] QNetwork classes for submitting google forms

2021-06-12 Thread Max Paperno
On 6/12/2021 1:29 PM, Nicholas Yue wrote: I have now moved the code into a small UI test app so there is already a Qt loop in the main app but it stopped working (status code not printed out) again, do I have to retain the app.exec() and app.exit() ? Probably because your networkManager goes

Re: [Interest] QNetwork classes for submitting google forms

2021-06-11 Thread Max Paperno
On 6/11/2021 10:32 PM, Thiago Macieira wrote: On Friday, 11 June 2021 14:10:57 PDT Max Paperno wrote: while (!gotResponse) sleep(1) // or whatever sleep method, just waiting for a response. NEVER EVER sleep. Insert a "return" here and let your slot be called when the tim

Re: [Interest] QNetwork classes for submitting google forms

2021-06-11 Thread Max Paperno
e; QObject::connect(,::finished, [](QNetworkReply*reply){ intstatus=reply->attribute( QNetworkRequest::HttpStatusCodeAttribute).toInt(); qDebug()<On Fri, 11 Jun 2021 at 14:18, Max Paperno <mailto:ma...@wdg.us>> wrote: > QObject::connect(, ::finished, ... Whoo

Re: [Interest] QNetwork classes for submitting google forms

2021-06-11 Thread Max Paperno
QObject::connect(, ::finished, ... Whoops, should really be QObject::connect(, ::finished, ... -Max ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] QNetwork classes for submitting google forms

2021-06-11 Thread Max Paperno
Hello Nicholas, I would like to know if I am using the Qt QNetwork classes correctly to submit a post to a URL that is a Google form From the docs[1]: QNetworkAccessManager has an asynchronous API. That means you have to wait for a finished() signal before trying to determine the status or

Re: [Interest] Model-view solution

2021-06-06 Thread Max Paperno
Hi Lars, Qt5 has a concept of Proxy Model - would it be possible to implement a list model and then use proxy model to "transforms" the data into a tree structure? Short answer would be "yes." Which approach is preferable for you really depends on your needs (current and possibly future).

Re: [Interest] How to use QOpenGLWidget from Qt Creator

2021-05-03 Thread Max Paperno
et of the class 'MyOpenGLWidget'; defaulting to base class 'QOpenGLWidget'." ``` The full source is here https://github.com/nyue/QtQuestions/tree/main/Qt5/opengl/mainwindow Cheers On Sun, 2 May 2021 at 23:13, Max Paperno <mailto:ma...@wdg.us>> wrote: Hi Nicholas, What

Re: [Interest] How to use QOpenGLWidget from Qt Creator

2021-05-03 Thread Max Paperno
Hi Nicholas, What you want to do is create your custom QOpenGLWidget first (it could be the bare minimum to start with, even just a header file with the class declaration). Then in Qt Creator/Designer you want to "promote" the placeholder QOpenGLWidget to your custom version. If you search

Re: [Interest] Guide me through the Qt offerings for GUIs

2021-04-30 Thread Max Paperno
On 4/22/2021 4:50 AM, Volker Hilsheimer wrote: * imperative painting Paint-event based drawing with a “pen” is not easily reconcilable with how GPUs like to work. Without a persistent scene graph that is uploaded to the GPU, much of the performance you get from a GPU islost. An

Re: [Interest] The willy-nilly deletion of convenience, methods

2021-03-24 Thread Max Paperno
On 3/23/2021 11:44 AM, Volker Hilsheimer wrote: ... I personally wonder why people that never want to change what they built last year want to develop software development. Isn’t that what makes building stuff out of bits and ideas so much more interesting than building stuff out of sticks

Re: [Interest] Qt Creator is so buggy and so slow...

2021-03-23 Thread Max Paperno
On 3/18/2021 8:38 PM, Alexander Dyagilev wrote: Hello, Often it just stops to suggest code, syntax highlighted stops working (at least for a part of the code) for no apparent reason. It takes apporx. 10 seconds to parse c++ file for c++ tools to start working. If you open/close/open same

Re: [Interest] The willy-nilly deletion of convenience methods

2021-03-22 Thread Max Paperno
On 3/22/2021 7:32 PM, Turtle Creek Software wrote: Re: willy-nilly I can relate to anyone who is unhappy about deprecated functions.  It is never fun when existing code breaks.  We want to be inventing new stuff, not going back and fixing old code just to stay in the same place.  The

Re: [Interest] Qt6 : linguist + *.ts files creation

2021-01-23 Thread Max Paperno
Hi Nicholas, The initial .ts files are also created when running lupdate from a command line or as part of your build (if the .ts file(s) will be created if they don't already exist). The process is described here: https://doc.qt.io/Qt-5/linguist-manager.html#using-lupdate QtCreator also

Re: [Interest] QtCreator: Auto-add backslash-style Doxygen commands rather than @-style

2020-07-26 Thread Max Paperno
Hi Lachlan, The command style doesn't seem to be configurable, but there's some auto-detection going on which tries to be smart. If you start the comment with a /*! (instead of double asterisk), then the generated Doxygen commands will use the backslash style instead of the @ style.

Re: [Interest] Windows 7 support will be dropped in Qt 6

2020-06-12 Thread Max Paperno
I would restate my objection by pointing out again [1] that Win 7 is still the 2nd most popular desktop OS in the world, with 3x more users than all MacOS versions combined. Never mind Linux, which is on par with Win XP users (the previous "known good" Windows version prior to 7). Any

Re: [Interest] Using Q_NAMESPACE enum as a Q_PROPERTY type

2020-05-03 Thread Max Paperno
Is the namespace in a linked library? Is there any exporting/importing involved at all? -Max On 5/2/2020 4:48 PM, Doogster wrote: I'm having trouble using an enum with Q_NAMESPACE, as a Q_PROPERTY type. I'm trying to follow this:

Re: [Interest] Wrong position QStyleOptionProgressBar on macOS

2020-03-20 Thread Max Paperno
On 3/20/2020 3:46 PM, John Weeks wrote: Alot of QStyle code seems to think that all drawing will be done in a widget solely occupied by whatever it is that QStyle is drawing. Drawing should be done starting at the given QStyleOption.rect.topLeft(). I don't think any of the drawing methods

Re: [Interest] Wrong position QStyleOptionProgressBar on macOS

2020-03-20 Thread Max Paperno
Hi Roman, Do you have an example?  And when you say "on macOS" does that mean the behavior is different on Win/Linux, or that you haven't tried it elsewhere? The delegate can't assume that drawing should be done at pos(0, 0), it must start at the coordinates given in

Re: [Interest] Will Qt6 end this enum issue? (or even 5.15?)

2020-03-20 Thread Max Paperno
https://plnkr.co/edit/p9BM4o2SPtvGB3ZC?open=lib%2Fscript.js (there's a console view which can be opened on the lower right) Cheers, -Max On 3/20/2020 4:56 AM, Max Paperno wrote: On 3/20/2020 4:44 AM, Max Paperno wrote: Obviously one could come up with a little helper function/object whic

Re: [Interest] Will Qt6 end this enum issue? (or even 5.15?)

2020-03-20 Thread Max Paperno
On 3/20/2020 4:44 AM, Max Paperno wrote: Obviously one could come up with a little helper function/object which makes this prettier. And you could make it auto-assign incremental values if one isn't provided in the "constructor" (like a C enum does) Err, sorry, I meant a hel

Re: [Interest] Will Qt6 end this enum issue? (or even 5.15?)

2020-03-20 Thread Max Paperno
On 3/20/2020 12:53 AM, Jason H wrote: That's only part of it. I want Qt to support it too, mainly for > console-qDebug output, but all for use in UI. (Imagine a text element > that displays a socket state as it's text.) I understand, my reply wasn't aimed at your original question. FWIW,

Re: [Interest] Will Qt6 end this enum issue? (or even 5.15?)

2020-03-19 Thread Max Paperno
On 3/19/2020 11:07 AM, Jérôme Godbout wrote: I always put my Enum into C++, the sad part is that you need to create a dummy class to be exposeed to contain the enum. This make it possible to use the enum into Qml and C++. You know you can use a namespace instead, right? Not sure that's more

Re: [Interest] Building strings with .arg() (arrrgh)

2020-03-05 Thread Max Paperno
On 3/5/2020 3:11 PM, Elvis Stansvik wrote: Den tors 5 mars 2020 kl 19:26 skrev Max Paperno : One thing for sure, since my benchmarks, from here on I will very much prefer the "multiArg" version of .arg() vs. using multiple .arg()s. Closing side note: There's a a nice Clazy

Re: [Interest] Building strings with .arg() (arrrgh)

2020-03-05 Thread Max Paperno
On 3/5/2020 10:20 AM, Benjamin TERRIER wrote: I believe Marc was saying that using QStringLiteral *inside* a .arg() call is an anti-pattern, and not that using .arg() *on* a QStringLiteral is one. Hmmm, good point, indeed it could be read that way. There are two references to .arg()

Re: [Interest] maintenance tool cannot download, qt.io too slow

2020-03-04 Thread Max Paperno
FWIW, it worked well for me early last evening (Tuesday, US Eastern TZ) for several installs from different machines. Unfortunately for all the MBs of other data logged by the installer, I don't see the actual download URL anywhere. The repos list in my maintenance tool is blank for each of

Re: [Interest] Building strings with .arg() (arrrgh)

2020-03-02 Thread Max Paperno
limitless variations which I didn't cover, and my focus was mainly on plain Latin1 strings. Cheers, -Max On 2/16/2020 11:33 PM, Max Paperno wrote: HI folks, I'm confused about a "best" way to use .arg() with fixed/static strings (not tr()). Or if it should be used at all, for t

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-17 Thread Max Paperno
Hi Matthew, On 2/17/2020 4:27 PM, Matthew Woehlke wrote: On 15/02/2020 00.40, Max Paperno wrote: To me this says that you specifically want the connection to be destroyed when the `context` object goes away, in case the sender and receiver/context objects aren't the same for some reason

[Interest] Editor history (was: Re: Signal/Slot connection fails, ...)

2020-02-17 Thread Max Paperno
One of the only two(*) things I miss about using Eclipse is that it automatically kept a history of file changes every time you saved (up to some configurable time period). And a built-in diff viewer where it was easy to compare revisions, revert all or parts, etc. Would be great to have that

[Interest] Building strings with .arg() (arrrgh)

2020-02-16 Thread Max Paperno
HI folks, I'm confused about a "best" way to use .arg() with fixed/static strings (not tr()). Or if it should be used at all, for that matter, in terms of efficiency. QStringLiteral seemed pretty good to me after reading several blog posts (from Marc Mutz, Kai Koehne, Olivier Goffart, among

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-16 Thread Max Paperno
Happened to stumble upon this clazy check while searching on a completely different issue. Seems to explain the reasoning pretty well. https://github.com/KDE/clazy/blob/master/docs/checks/README-connect-3arg-lambda.md -Max On 2/15/2020 12:40 AM, Max Paperno wrote: On 2/14/2020 11:19 PM

Re: [Interest] Signal/Slot connection fails, even though QMetaObject::activate is called

2020-02-14 Thread Max Paperno
On 2/14/2020 11:19 PM, Tony Rietwyk wrote (in part): I thought the whole point of the [=] in the lambda is to capture a shallow copy of the state required by the code within the lambda. May I ask why you think that, or what you mean?  I can't find any reference to [=] capturing anything

Re: [Interest] Klocwork errors in Qt

2019-12-06 Thread Max Paperno
On 12/4/2019 9:31 AM, Roland Hughes wrote: If you think auto won't be removed as a failed experiment, how about "new"? Deprecated in C++20 and slated for removal in C++23. https://www.modernescpp.com/index.php/no-new-new Some more reading on the removal of pointers

Re: [Interest] QInputDialog as item delegate?

2019-11-13 Thread Max Paperno
Hi Matthew, I have this in a delegate and it seems to work well.  I don't know about "best way."  This one intercepts the double-click event which would typically open an editor. It could also work with a single click if you prefer (I personally found that annoying from a user perspective).