Have you looked at the code for the existing layouts and how they
integrate...

 

IIRC (and its been 4+ years since I did this exact thing for a
customer), I had to crfeate a widget to render some things for the
layout we added..

 

I essentially started with the code for the Grid Layout, and extended it
from there

 

Scott

 

From: [email protected]
[mailto:[email protected]] On
Behalf Of Jason H
Sent: Wednesday, November 30, 2011 2:44 PM
To: Andreas Pakulat; [email protected]
Subject: Re: [Interest] Adding layouts to designer?

 

Thanks Andreas, but what if I wanted to reject reality and substitute my
own? What would my options be? For a hypothetical example, say I wanted
to add a"FlowLayout"?

 

I'm thinking an inelegant but possibly functional solution would to be
to create a FlowWidget which has the FlowLayout set by default. Would
that work or not? 

 

 

 

 

________________________________

From: Andreas Pakulat <[email protected]>
To: [email protected] 
Sent: Wednesday, November 30, 2011 5:36 PM
Subject: Re: [Interest] Adding layouts to designer?

On 30.11.11 13:44:07, Jason H wrote:
> I want to add some additional layouts to Designer (yes, that dinosaur)
I have a widget library I am working on, and I have a special layout
that I need to add. Now the plugin only works for those things which can
return a QWidget*, but QLayouts are not based on QWidget. So how do I
add my special layout to Designer?
> 
> I'm stumped here.

Thats because you can't. Designer is not universally extendable as you'd
like it to be. It does not even support all kinds of qwidgets since it
has quite some special code for handling some of the standard Qt widgets
(QMainWindow, Q(Table|Tree|List)Widget, but others too IIRC).

Andreas

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest



_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to