[Qt-interest] Custom widget behaviour in designer preview
Tom Cobb
tom.cobb at diamond.ac.uk
Thu May 28 16:35:33 CEST 2009
Hi,
I've written a custom widget for Qt Designer which uses the ffmpeg libraries
to decode an mjpeg stream, and display it via a QGLWidget. I've added the
QDesignerCustomWidgetInterface layer so it is visible in designer, and
everything seems to work fine. However, as soon as I create the widget on
the screen it connects to the URL and starts displaying the mjpeg stream,
which is mildly distracting when trying to create the rest of the screen
around it. Ideally I'd like the widget to only connect to the stream in
"Preview" mode, not in "Design" mode. Is it possible for the
QDesignerCustomWidgetInterface layer to know whether it is creating a widget
for use in "Preview" or in "Design" mode?
Apologies if this question has already been asked, but a quick search of the
archives didn't reveal any answers.
Thanks,
Tom
More information about the Qt-interest-old
mailing list