[PyQt] Using a preview widget with a QColumnView

Mark Visser markv at lumierevfx.com
Thu Jan 14 17:36:43 GMT 2010


QColumnView steadfastly refuses to display a preview widget. Could 
someone else try running this code snippet and see if it works for you?

|import sys
||from PyQt4 import QtCore, QtGui
|||
| app = QtGui.QApplication(sys.argv)
model = QtGui.QFileSystemModel()
model.setRootPath('/')
view = QtGui.QColumnView()
view.setModel(model)
label = QtGui.QLabel('HELLO')
view.setPreviewWidget(label)
view.show()
app.exec_()
|
Unless I'm missing something, navigating to a file should show the 
'HELLO' label in the right-most pane of the column view. Doesn't work 
for me, the pane is blank. I've confirmed that the updatePreviewWidget 
signal is being emitted.

(Python 2.5.4, Qt 4.6.0, PyQt 4.6.2, X11)

cheers,
-Mark

-- 
Mark Visser, Software Director
Lumière VFX
Email: markv at lumierevfx.com
Phone: +1-514-316-1080 x3030

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100114/6013fe58/attachment.html>


More information about the PyQt mailing list