Hi all, 

I attached a little program implementing a simple image viewer (~ 170 lines of 
code). It displays any picture file (supported by QImage) dragged and dropped 
from a filemanager on it. Now I'd like to do some special action if the Ctrl 
key is pressed while dropping a file on the window. 

This doesn't work because event.keyboardModifiers() == Qt.ControlModifier is 
always False. Is this a bug or am I doing something wrong?

To see what I mean, please look at line 158 of my attached file (benview.py). 
Run benview.py and Ctrl-Drop any file on the appearing window. On my Kubuntu 
Hardy with Qt 4.4, PyQt 4.3.3, line 158 always prints "False". The same was 
true on Kubuntu Gutsy and Qt 4.3. 

Any hints on this are much appreciated.

Have a nice day, 

Benno. 

Attachment: benview.py
Description: application/python

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to