PDA

View Full Version : QTableView and margin



miraks
27th April 2009, 10:44
Hi,

I modified my QTableView to clean selection when the user click on blank area.

My problem is that, when the QTableView contains many lines, there is no blank area on bottom of it.

So, how can I add blank area on bottom of a QTableView ?

Regards,
Stephane

Lykurg
27th April 2009, 13:11
What's about QAbstractScrollArea::setViewportMargins()?

miraks
27th April 2009, 16:33
Hi Lykurg,

I tried to put the following line in the constructor of my QTableView but it doesn't work:

setViewportMargins(0, 0, 0, 200);

Why ? Do you know how to use it ?

Regards.

miraks
3rd May 2009, 10:11
An idea ? Please help !

Lykurg
3rd May 2009, 12:14
Please can you post a small - executable - sample code demonstrating your problem. That would be easier.

miraks
17th May 2009, 13:41
Hi Lykurg,

Please can you post a small - executable - sample code demonstrating your problem. That would be easier.

It's not easy to isolate code and I think it's not needed because I found this:
http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=94559

Do you have an other idea ?

talk2amulya
17th May 2009, 15:14
i dont know why you would like to have blank area..if you really want to clear selection, why dont you just provide a button outside of tableview..and clear selection on its click..i guess its more user intuitive too..i'd agree with Qt guys for not solving the "bug" since its not really necessary.