1 Attachment(s)
Incorrect position of QPushButton on mac
I am using Qt 4.7.1 on both mac and windows (downloaded from the binary packages), and am seeing a problem on mac with the layout and positioning of the QPushButton widget.
Occasionally buttons will be placed in the wrong position, looking like they are incorrectly vertically offset by half their height.
I've attached a screenshot to show what I mean:
Attachment 5985
Has anyone seen this issue?
I think it may be related to the behaviour of Qt on mac that converts small buttons from rounded to square, maybe I should be setting the minimum size for these buttons?
thanks,
francis
Re: Incorrect position of QPushButton on mac
Please show us your code for building the layout containing those buttons.
2 Attachment(s)
Re: Incorrect position of QPushButton on mac
I've recreated the problem in a small QtCreator project, and attached it to this post.
Also heres a screen shot of the problem again, recreated in this test app.
Attachment 6005
Attachment 6006
The button itself is layed out in a custom widget class. This widget is then added to a dock widget.
The bug happens only when that dock is floating. Once you dock it into the main app window, the button reverts to being 'square' is not cut off any more.
Whats odd is that, if you edit the code so that the dock is docked in the main app window by default, it gets layed out properly (both when docked and when floating)! Plus the button is rendered 'rounded' when docked!
Re: Incorrect position of QPushButton on mac
What happens if you add the dock widget manually and not with Designer?
Re: Incorrect position of QPushButton on mac
If I create the dock widget programmatically instead of through the QtCreator template, then the same problem happens.
I guess its time to support a bug report to Qt; I was hoping it was something I was doing wrong, so I could fix it quickly!