[Qt-interest] Basic update() paint - more info
Phil
phillor at telstra.com
Tue Jan 27 01:12:33 CET 2009
On Monday 26 January 2009 15:54:39 Phil wrote:
> On Friday 23 January 2009 11:05:23 andrew.m.goth at l-3com.com wrote:
> > Phil wrote:
> > > Calling update() under QT3 used to work and reading the
> > > documentation hasn't helped. How do I now force a paintevent
> > > under QT4?
> >
After another restless night I now realise that it's not update() that's the
problem, it's how I'm calling the class that contains the paint event and
update(),
This is how I'm currently calling the Map class function from the base class:
Map map(mapFrame);
map.functionX();
Which actually works, however I now have a new instance of map (of course)
each time functionX() is called, which is not want I want. So now I suspect
that it boils down to a C++ question rather that specifically a QT question.
What I need is to include "Map map(mapFrame)" in my base class header file as
an attribute so that I only have one instance of map. The problem is that this
causes an error: "mapFrame is not a type". mapFrame is the name of the frame
generated by and then promoted under Designer.
Neither
Map* map = new Map(mapFrame);
map->functionX();
nor
Map map;
map.functionX();
will triger a new paint event. Only Map map(mapFrame) seems to work, at the
moment.
So, any help that leads to an answer will be greatly appreciated.
--
Regards,
Phil.
More information about the Qt-interest-old
mailing list