Try setting the layout margins in Data_editor to 0:
Try setting the layout margins in Data_editor to 0:
Last edited by norobro; 19th March 2013 at 19:46. Reason: typo
norobro: Right on!
Thank you so much I would have never tried that. If you have a minute would you care to explain why it works?
The editor show up nicely with the two QDoubleSpinBox and I can interact with them at will. However the display of the model remains visible while the editor is active. Any idea how to remove, blank or hide the model display for that item while the editor is active.
Thanks.
Last edited by abgeos; 19th March 2013 at 20:56. Reason: spelling corrections
You're welcome. According to the docs QLayout::setMargin() is obsolete so you should use QLayout::setContentsMargins() instead.
I encountered this once upon a time and as I recall the row height for a QTreeView with the default font (9 pt) on my system is 13 and the default margin is 11. The upper and lower margins take up more space than is available on the row so there is no space to paint the layout contents. Try incrementing the margins up from zero and I think you will see your spinboxes disappearing.
Put the following statement in the Data_editor ctor:Qt Code:
setAutoFillBackground(true);To copy to clipboard, switch view to plain text mode
abgeos (20th March 2013)
Thanks for the explanation. Everything is now working properly.
Hey abgeos,
can you post your source code? I am wanting to do a slider and spinbox instead of 2 spinbox and having some issues.
Appreciate your help!
Thanks,
Sunny
Bookmarks