<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hey David,<br>
<br>
thanks for the reply!<br>
<br>
I know this stuff about "promotion" in code, i just wanted to figure
out how i can do it in Designer. Glad to know that next version of it
will allow for this stuff!<br>
<br>
Thanks again!<br>
<br>
David Boddie wrote:
<blockquote cite="mid:200804172334.43460.david@boddie.org.uk"
type="cite">
<pre wrap="">On Wed, 16 Apr 2008 13:10:01 +0300, objectref wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I am reading Mark Summerfields' "Rapid Gui Programming with Python and Qt".
Until the chapter I am now, I saw that we can build a new custom widget by
subclassing an existing one and adding our own stuff. All this by code.
Can I achieve the same thing by using solely the Qt Designer ?? I mean,
let's say I want to make a widget that practically it is a collection of
some other, predefined ones, and I want to define some properties on it in
a way that I can see these properties in Designer's Property Editor. Can I
do this somehow ?
</pre>
</blockquote>
<pre wrap=""><!---->
You can use another widget as a placeholder for your custom widget by
"promoting" it - the custom widget in your application must be a subclass
of the widget you use as a placeholder.
I forget whether you can define new properties for the promoted widget. I'm
certain you can do this with the upcoming Qt 4.4 version of Qt Designer, and
it may also be possible with Qt 4.3.
David
_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
</pre>
</blockquote>
<br>
</body>
</html>