[Qt-interest] Showing a "Please wait" dialog during sql query
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Tue Jun 8 00:27:57 CEST 2010
This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.
If this email is from an unknown source, please simply delete this email.
If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.
+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".
Additional instructions and options on how to receive these attachments can be found at:
http://security.it.ray.com/antivirus/extensions.html
http://security.it.ray.com/news/2007/zipfiles.html
Should you have any questions or difficulty with these instructions, please contact the Help Desk at 877.844.4712
---
I have attached a working solution. Its not fully vetted, so bugs
probably exist :) but it works in the case shown...
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Jason H
Sent: Monday, June 07, 2010 12:25 PM
To: Gillen Daniel; qt-interest at trolltech.com
Subject: Re: [Qt-interest] Showing a "Please wait" dialog during sql
query
You might want to look into async event notifications, which are
supported for PostgreSQL. then port to MySQL if the server supports it.
Then it is just signal/slots.
----- Original Message ----
From: Gillen Daniel <gillen.daniel at gmail.com>
To: qt-interest at trolltech.com
Sent: Mon, June 7, 2010 1:31:33 PM
Subject: [Qt-interest] Showing a "Please wait" dialog during sql query
Hi @all
I have a massive problem here and don't seem to find a solution for it.
I'm developping a database application based on a MySQL database and I
would need to display a "Please wait" dialog while
populating a QSqlQueryModel. The data from QSqlQueryModel gets displayed
in a widget in my main window, so I have to exec the query in my main
thread. The problem is that any dialog I open before querying the data
hangs as my query blocks the main thread.
Does anyone has an idea on how I could solve this? I would need some
sort of 2nd thread which displays the dialog with his own event loop but
as far as I understand, Qt does not support GUI interaction in a second
thread. Or is it perhaps possible to exec the query in a second thread
and then move the whole QSqlQueryModel and database connection to my
main thread?
Thx in advance
--
Unix _IS_ user friendly - it's just
selective about who its friends are!
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list