I can easily draw objects in my widget's area. The problem I have is that I need to be able to have the widget work properly within the layout. So I do need to be able to determine size, and also be able to take up space. My initial use of the widget requires that it be centered in the dialog - so I wanted to put a horizontal spacer on either side; I might even try adding some vertical spacers around it as well to help center it entirely.
I have now implemented minimizeSizeHint(), sizeHint(), and set the sizePolicy to QSizePolicy(Expanding,Expanding). It seems to be doing what I want now.




Reply With Quote
Bookmarks