Why 6 threads for a simple app?
-
I was just wondering why there are 6 threads in task manager when running the simple widgets tutorial example. What are the other non UI threads doing? Is -QT- Qt making a new thread for each individual widget behind the scenes?
Running the release build of qt-tutorial-01 shows 131 handles and 6 threads, although these numbers fluctuate while the app is just sitting idle. Seems extremely inefficient, in addition to using up almost 11 MB of memory.
BTW - Do you intend to fix the compile errors? I mean really, in the first tutorial example???
(Now it's down to 3 threads, no wait, back up to 5 threads - what's going on in there?)
-
There are also OS threads, running in the apps.
E.g. on Windows, if COM is initialised (AFAIK Qt initialises COM on windows), there are COM threads running. Not each thread is a user created one.By the way, which bugs do you mean? in "the docs page":http://doc.qt.nokia.com/4.7/widgets-tutorial.html it should work
-
Thanks for the info on threads.
The bugs are on the following URL.
http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_TutorialJust 2 simple errors:
Line 18 of widget.h
Line 16 of widget.cppEasy to fix, but annoying for an absolute beginner.
-
[quote author="cmayer" date="1318608554"]
The bugs are on the following URL.
http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_TutorialJust 2 simple errors:
Line 18 of widget.h
Line 16 of widget.cpp
[/quote]I would assume that the extra ';' you are seeing there is due to a bug in devnet.
"See this thread":http://developer.qt.nokia.com/forums/viewthread/8336/
and "here is the bugreport on JIRA":https://bugreports.qt.nokia.com//browse/QTWEBSITE-264
On JIRA you can vote to raise the importance of this issue. -
[quote author="cmayer" date="1318608554"]Thanks for the info on threads.
The bugs are on the following URL.
http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial
[/quote]So, you aretalking about the wiki, not the docs :-)
The wiki acan even be edited by yourself... -
[quote author="koahnig" date="1318610668"]
I would assume that the extra ';' you are seeing there is due to a bug in devnet.
"See this thread":http://developer.qt.nokia.com/forums/viewthread/8336/
and "here is the bugreport on JIRA":https://bugreports.qt.nokia.com//browse/QTWEBSITE-264
On JIRA you can vote to raise the importance of this issue. [/quote]This bug seems to be fixed, I remove the semicolons and they stay away...
-
This is a test
@
void test ( double & tst );
connect(&tcpSocket, ... );
@[quote author="Gerolf" date="1318613916"]This bug seems to be fixed, I remove the semicolons and they stay away...[/quote]
You seem to be right. Hopefully, it is fixed and not just vanished for some time. :-)