Albert,

I've also seen this not too long ago. The fix for me was:
for (unsigned c = 0; c < model_->columnCount(); ++c) {
  model_->setHeaderData(c, Horizontal, 0, LevelRole);
}

Best regards,
Wim.

Op 10 april 2012 21:12 heeft Albert Scholl
<[email protected]> het volgende geschreven:
> Hello,
>
> we have an problem with WTableView. When we use the TableView with our
> own Model (derived from WAbstractTableModel), the header ist not
> displayed correctly.
> The header is present but seems to be empty (as shown on the attached
> image - a bit hard to see due to the colors - the header-grey is only
> slightly different from the background-grey).
>
> If we use the WStandardItemModel it works (same settings, just changed
> the model and with some test-rows instead of the real data).
>
> Looking at the generated html there is only one difference (on two
> positions), an additional CSS-Rule which seems to move the content of
> the header-item above the visible area:
>
>   style="margin-top: -1.03079e+11px;"
>
> The generated html-source is at the end of the mail.
>
> We cant' find out where this style comes from.
>
> Any hint how to solve that?
>
> regards
> Albert
>
>
> Generated HTML with WStandardItemModel:
>
> <div id="omcqo41" class="Wt-tv-c2 Wt-tv-c headerrh" style="float: left; 
> width: 97px;">
>   <div id="omcqo42" onmousedown="var e=event||window.event,o=this;{var 
> f=function(obj, event) {jQuery.data($('#omcqobh').get(0), 
> 'obj').resizeHandleMDown(obj, event);};f(o,e);}"
>            class="Wt-tv-rh Wt-tv-br headerrh"></div>
>   <div id="omcqo40" class="Wt-wwrap" style="text-align: left; overflow: 
> hidden;">
>      <div id="contents_omcqo45">
>         <div id="sort_omcqo44" onclick="var 
> e=event||window.event,o=this;Wt._p_.update(o,'s83',e,true);" class="Wt-tv-sh 
> Wt-tv-sh-none"></div>
>         <div id="t_omcqo43" onclick="var 
> e=event||window.event,o=this;Wt._p_.update(o,'s84',e,true);" 
> class="Wt-label">Konto</div>
>      </div>
>   </div>
> </div>
>
>
> Generated HTML with own WAbstractTableModel derived model:
>
> <div id="o6lvzcw" class="Wt-tv-c2 Wt-tv-c headerrh" style="float: left; 
> width: 97px;">
>   <div id="o6lvzcx" onmousedown="var e=event||window.event,o=this;{var 
> f=function(obj, event) {jQuery.data($('#o6lvzl1').get(0), 
> 'obj').resizeHandleMDown(obj, event);};f(o,e);}"
>            class="Wt-tv-rh Wt-tv-br headerrh" style="margin-top: 
> -1.03079e+11px;"></div>
>   <div id="o6lvzcv" class="Wt-wwrap" style="text-align: left; overflow: 
> hidden;">
>      <div id="contents_o6lvzd0" style="margin-top: -1.03079e+11px;">
>         <div id="sort_o6lvzcz" onclick="var 
> e=event||window.event,o=this;Wt._p_.update(o,'s71',e,true);" class="Wt-tv-sh 
> Wt-tv-sh-none"></div>
>         <div id="t_o6lvzcy" onclick="var 
> e=event||window.event,o=this;Wt._p_.update(o,'s72',e,true);" 
> class="Wt-label">Konto</div>
>      </div>
>   </div>
> </div>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to