[Qt-interest] vertical QHeaderView clipping - revisited

Paul Miller paul at fxtech.com
Fri Dec 12 20:42:17 CET 2008


Efan Harris wrote:
> Oops I told you wrong one, This will do
> 
> horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);

No, that doesn't work either. The vertical header is not a column of the 
horizontal header, so is unaffected.

> 
> On Fri, Dec 12, 2008 at 10:48 AM, Paul Miller <paul at fxtech.com 
> <mailto:paul at fxtech.com>> wrote:
> 
>     Efan Harris wrote:
>      > Hi,
>      > Did you try resizecolumnToContents() ??
> 
>     Yes, it doesn't work. Headers aren't technically columns, so those
>     functions don't really affect it anyway.
> 
>      >
>      > Efan
>      > On Fri, Dec 12, 2008 at 9:44 AM, Paul Miller <paul at fxtech.com
>     <mailto:paul at fxtech.com>
>      > <mailto:paul at fxtech.com <mailto:paul at fxtech.com>>> wrote:
>      >
>      >     I found this thread from almost 3 years ago:
>      >
>      >     http://lists.trolltech.com/qt-interest/2006-02/thread00317-0.html
>      >
>      >     I'm using Qt 4.4 and am experiencing the exact same problem.
>     My vertical
>      >     header (for a QTableView) will not resize itself horizontally
>     when I
>      >     change the labels. When I first display the table, if I have
>     "Some Text"
>      >     in header for the first row, then programmatically change it
>     to "Some
>      >     Bigger Text", it will end up displayed as "Some Bigg". And
>     there doesn't
>      >     seem to be a function I can call to re-layout the header
>     manually.
>      >
>      >     Obviously, this is not acceptable. Is there any way to work
>     around this?
>      >
>      >
>      >     --
>      >     Paul Miller | paul at fxtech.com <mailto:paul at fxtech.com>
>     <mailto:paul at fxtech.com <mailto:paul at fxtech.com>> |
>      >     www.fxtech.com <http://www.fxtech.com>
>     <http://www.fxtech.com> | Got Tivo?
>      >
>      >     _______________________________________________
>      >     Qt-interest mailing list
>      >     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     <mailto:Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>>
>      >     http://lists.trolltech.com/mailman/listinfo/qt-interest
>      >
>      >
> 
> 
>     --
>     Paul Miller | paul at fxtech.com <mailto:paul at fxtech.com> |
>     www.fxtech.com <http://www.fxtech.com> | Got Tivo?
> 
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> 


-- 
Paul Miller | paul at fxtech.com | www.fxtech.com | Got Tivo?




More information about the Qt-interest-old mailing list