[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: How can I resize a QCanvas when it's QCanvasView is resized
From:       Jeff McLean <9jrm4 () qlink ! queensu ! ca>
Date:       2003-06-02 13:46:50
[Download RAW message or body]

Hi Thomas,

I agree I still have a long way to go with Qt before I can do this stuff with 
my eyes closed :)

What I mean is that I start my canvas off as 500x500 (I have to use a 
canvas::resize() to get it to even show up) but when I try to maximize the 
window, although the canvas' containing QCanvasView is resized, the QCanvas 
itself is not - I can tell because I can't drag my QCanvasItems outside of 
the original QCanvas boundary.  I thought that Qt would have taken care of 
telling the QCanvas to resize when its QCanvasView is resized, but that isn't 
happening, and there isn't a signal QCanvasView::resized() that I could 
connect to my container widget to tell the QCanvas to resize either.

Does that explain what I mean a bit more?

Thanks again,
Jeff

BTW, if you can suggest any more materials for learning the Qt, KDE, and 
KOffice APIs that would be very much appreciated.  I have done the online Qt 
tutorials, and now I'm thinking about getting the o'reilly book about Qt.


On Monday 02 June 2003 05:07 am, Thomas Zander wrote:
> On Mon, Jun 02, 2003 at 02:48:21AM -0400, Jeff McLean wrote:
> > Hi,
> >
> > Sorry to ask a strait-QT/KDE question I hope that is OK.
> >
> > Again, I'm working on learning the required skills to make my drawing
> > program, and I have a QCanvasView and it's associated QCanvas.  I have a
> > few QCanvasItems that I can drag around, and it's working well.  But,
> > when I resize the window, the canvas doesn't resize.  I know the
> > QCanvasVIew does, because I added a printf line to its sizePolicy().   I
> > can see that the canvas is not getting resized because I can't drag the
> > items past where the original window border was.
>
> A canvas is the size of your painting; what does that have to do with the
> view?
> I don't think your canvas _should_ get smaller (dropping things) when your
> window is resized.
> That would also mean you would lose items when you zoom in.
>
> I think you should read the Qt docs a little longer :)

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic