Re: QWT plugin for Qt Designer... Won't be promoted to...
Brought to you by:
rathmann
From: David S. <David_Stranz@MassSpec.com> - 2009-10-30 14:43:51
|
Jia, > if (someplot) delete someplot; > someplot = new InheritedQwtPlot(); You can probably do this. I think you need to make sure that the replacement plot has the correct parent, so your code should probably be someplot = new InheritedQwtPlot( this ); You should test this to confirm it. Regards, David _______________________________________________________________ David Stranz, Ph.D. david_stranz@MassSpec.com Sierra Analytics, Inc. 5815 Stoddard Road, Suite 601 Modesto, CA 95356 Tel: (209) 545-8508 http://www.massspec.com _______________________________________________________________ JIA Pei wrote: > Hi, Sorry for my impoliteness. > > Sorry.... > > I just need it to put it into my application. > > I happened to come up with a very very simple idea. I'm wondering if > that will work? > > Let say, there is a QwtPlot object automatically generated for the .ui . > for example: > > QwtPlot* someplot = new QwtPlot(); > > > I can actually do something like this: > > > if (someplot) delete someplot; > someplot = new InheritedQwtPlot(); > > > In this case, I may obtain the effect the same as "promoted to..." . > So, can you please confirm this for me? > > > Thank you !! > > > Best Regards > JIA > > > > On Fri, Oct 30, 2009 at 2:27 AM, David Stranz <Dav...@ma...> wrote: >> Jia, >> >> If you are prepared to edit the Qt Designer .ui file (XML) file >> yourself, you can do this promotion by adding a QwtPlot, then editing >> the XML to change it to your derived class. You must provide all the >> information the UI compiler needs to generate the MOC files, but it >> isn't that hard to do. >> >> Try adding a different (Qt) widget, then promoting that so you can see >> what new code gets added to the XML. >> >> > So, will QWT release an updated version ASAP to recover this drawback? >> >> Keep in mind that "QWT" is "Uwe", and he has a lot of things to do. Qwt >> is just his side project, and he doesn't get paid to do it. Demanding >> that he do something "ASAP" just for you isn't very polite, is it? >> >> Best regards, >> >> David >> _______________________________________________________________ >> David Stranz, Ph.D. david_stranz@MassSpec.com >> >> Sierra Analytics, Inc. >> 5815 Stoddard Road, Suite 601 >> Modesto, CA 95356 >> >> Tel: (209) 545-8508 >> http://www.massspec.com >> _______________________________________________________________ >> >> >> >> JIA Pei wrote: >>> Hi, I think this is a very serious user requirement for QWT. >>> >>> Please refer to >>> http://www.qtcentre.org/forum/f-qwt-23/t-qwtplot-promote-to-custom-widget-6669.html >>> >>> I would like to use my self-defined class extended from "QwtPlot", >>> something like >>> >>> class CDataPlot : public QwtPlot >>> { >>> } >>> >>> However, QT Designer seems not permit me to promote QwtPlot to my own >>> class because there is nothing relative to QWT >>> shown in the New Promoted Class list. >>> >>> So, will QWT release an updated version ASAP to recover this drawback? >>> >>> Best Regards >>> JIA >>> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> qwt-interest mailing list >> qwt...@li... >> https://lists.sourceforge.net/lists/listinfo/qwt-interest >> > > > |