Active Topics

 


Reply
Thread Tools
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#11
The program that opens the ProgressDialog owns it via its main window. If your application is not in focus while opening the dialog, this might confuse the Qt mechanics. But I wouldn't think that this is hard to solve. Applications continue to run and update their windows when in "Task view".
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#12
yeah - i had to load my mainwindo - then do the qt progress bar as part of that - was tricky :P
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#13
the only thing I cant get working is the "infinite lopping"

I set everything to 0
and call setProgress, but it gives the error that QProgressDialog has no attribute
 
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#14
actually its not working well
at first its just blank dialog
than the 0% appears
and hangs at 0 until its finished

it closes fine
but doesn't progress
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#15
Did you read the documentation?

http://doc.qt.nokia.com/4.6/qprogressdialog.html

It looks very much like the it will not behave like a normal ProgressBar. But you'll have to read.
 
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#16
yes I have read it
and am no closer to fixing my problem
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#17
healthchecks does work - and not sure why if yours isnt?

code is here - http://gitorious.org/healthcheck/healthcheck
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#18
I can't figure it out
Here is my code

Code:
progress = QtGui.QProgressDialog("Please Wait", "Cancel", 0, 100, self.mainForm)
	progress.setWindowModality(QtCore.Qt.WindowModal)
	progress.setAutoReset(True)
	progress.setAutoClose(True)
	progress.setMinimum(0)
	progress.setMaximum(100)
	progress.resize(800,220)
	progress.setWindowTitle("Running OCR engine")
	progress.show()

	progress.setValue(0)
	os.system('convert '+ lastPic+ ' test.tif')
	progress.setValue(30)

    	os.system('tesseract test.tif test')
	progress.setValue(100)
	progress.hide()
Btw. the code is run in a controller class, so I pass the parent as self.mainWindow, which is a reference to mainWindow class
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#19
Guys - QProgressDialog is asynchronous, you need to either update via signals, asynchronously, or manually force the redraw. Also, with 4.6, if you just want to say I'm busy, and not a real progress bar, there is a window attribute for the little circular busy indicator.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#20
how can i force it to redraw?

Last edited by zolakt; 2010-05-04 at 17:51.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:40.