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 a
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 M
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
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
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
rviceUrl);
QNetworkAccessManagernetworkManager;
boolgotResponse=false;
QObject::connect(&networkManager,&QNetworkAccessManager::finished,
[&gotResponse](QNetworkReply*reply){
intstatus=reply->attribute(
QNetworkRequest::HttpStatusCodeAttribute).toInt();
qDebug()<On Fri, 11 Jun 2021 at 14:1
QObject::connect(&networkManager, &networkManager::finished, ...
Whoops, should really be
QObject::connect(&networkManager, &QNetworkAccessManager::finished, ...
-Max
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/lis
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 r
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). A
create a custom widget 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>&
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 o
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 animatio
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
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 c
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
C+
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 has
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.
Similarl
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 softwar
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:
https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces
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
as
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 QStyleOptionViewItem.rect
eted: test();
}
-
JavaScript demo:
https://plnkr.co/edit/p9BM4o2SPtvGB3ZC?open=lib%2Fscript.js&preview
(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
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
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, th
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
f
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 diag
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() being
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 the
s.
Obviously there are almost 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()).
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.
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 o
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 o
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
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 about
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
https://www.fluentcpp.com/20
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). T
36 matches
Mail list logo