Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, June 2007
QDockWidget resizing issue


Message 1 in thread

Hello-

I have a QDockWidget that Ive placed in my QMainWindow.
Im trying to keep the thing from being able to resize
vertically.  I dont want the user dragging on it so
it gets larger in the Y direction.  The dockwidge is
non-floating and fixed at the top.  No matter what I try
it keeps allowing me to resize it.  Ive called these
functions on it:

    QSizePolicy size;
    size.setVerticalPolicy(QSizePolicy::Fixed);
    setSizePolicy(size);
    setFixedHeight(120);

Also, is there a way to disable the drag bar at the bottom of
the dockwidget as well?

Thanks,
Jeff

--
 [ signature omitted ] 

Message 2 in thread

On 24.06.07 18:18:08, Jeff Lacki wrote:
> 
> Hello-
> 
> I have a QDockWidget that Ive placed in my QMainWindow.
> Im trying to keep the thing from being able to resize
> vertically.  I dont want the user dragging on it so
> it gets larger in the Y direction.  The dockwidge is
> non-floating and fixed at the top.  No matter what I try
> it keeps allowing me to resize it.  Ive called these
> functions on it:
> 
>     QSizePolicy size;
>     size.setVerticalPolicy(QSizePolicy::Fixed);
>     setSizePolicy(size);
>     setFixedHeight(120);
> 
> Also, is there a way to disable the drag bar at the bottom of
> the dockwidget as well?

Maybe I'm missing something, but if you don't want all this, why do you
use a QDockWidget at all? Use a standard widget and put it into the
central area with your content widget using a QSplitter if you want to
allow horizontal resizing.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Andreas Pakulat wrote:

>
>Maybe I'm missing something, but if you don't want all this, why do you
>use a QDockWidget at all? Use a standard widget and put it into the
>central area with your content widget using a QSplitter if you want to
>allow horizontal resizing.
>
>Andreas
>
>  
>
My MainWindow has a dockwidget at the top and a QGraphicsView below.  My 
central widget is
the view, which is why Im using a dockwidget at the top.

The dockwidget appears to be broken again.  I looked at some bug reports 
and it appears that is has
been problematic in this even up until 4.3.0.  Ive tried 4.3.1 and it 
doesnt work either.

As a side question (minor), can I remove the title of the dockwidget 
somehow or is it required?  It takes up
real estate I would rather keep for the View.

Thanks,
Jeff


--
 [ signature omitted ] 

Message 4 in thread

On 25.06.07 12:01:22, Jeff Lacki wrote:
> Andreas Pakulat wrote:
> >Maybe I'm missing something, but if you don't want all this, why do you
> >use a QDockWidget at all? Use a standard widget and put it into the
> >central area with your content widget using a QSplitter if you want to
> >allow horizontal resizing.
> >
> My MainWindow has a dockwidget at the top and a QGraphicsView below.  My 
> central widget is
> the view, which is why Im using a dockwidget at the top.

Thats not a real answer to my question. As far as I can see you don't
want any features of the dockwidget, so having the graphics view and the
content of the dockwidget in a vertical layout as central widget would
do the same thing. And you wouldn't have to hack the dockwidget to
disable vertical/horizontal resize.

> The dockwidget appears to be broken again.

Dockwidgets work fine over here.

> I looked at some bug reports and it appears that is has been
> problematic in this even up until 4.3.0.  Ive tried 4.3.1 and it
> doesnt work either.

There's no Qt4.3.1, there may be post 4.3.0 snapshots of course. I don't
see what needs to be fixed in dockwidgets, they behave as I would expect
them to.

> As a side question (minor), can I remove the title of the dockwidget somehow or 
> is it required?  It takes up
> real estate I would rather keep for the View.

See above, if you don't want the dockwidget features don't use a
dockwidget.

Andreas

PS: I don't need a private copy of the mail.

-- 
 [ signature omitted ]