[PyQt] Crash in QDockWidget::initStyleOption
Phil Thompson
phil at riverbankcomputing.com
Mon Mar 31 00:20:01 BST 2014
On 30-03-2014 8:00 pm, Thomi Richards wrote:
> Hi,
>
> On Mon, Mar 31, 2014 at 2:56 AM, Phil Thompson
> <phil at riverbankcomputing.com [1]> wrote:
>
>> Its not a bug - you just cant do what you want to. Qt uses an
>> internal class as the layout for a QDockWidget. It assumes (and
>> doesnt check) that its layout is a valid instance of that class.
>
> Thanks for your quick reply. Im a little confused though - whats the
> recommended way to lay out widgets in a QDockWidget? Id like to use
> the form layout style, since that seems like the best fit for the UI
> Id like to create. The default layout in a QDockWidget looks like a
> simple QLayout, which (AFAICS), doesnt help me much.
Create your own widget, with your own layout, and pass it to
QDockWidget.setWidget().
Phil
More information about the PyQt
mailing list