Re: Calculating button width
did you try calculation in showevent()?
Re: Calculating button width
Good idea... didn't think of that, but after testing, nope. The width is still the same :mad:
Re: Calculating button width
Maybe this will fix your Problem? [WIKI]Expanding_dialog[/WIKI]
Re: Calculating button width
Quote:
Originally Posted by
nightghost
Maybe this will fix your Problem? [WIKI]Expanding_dialog[/WIKI]
I initially started using the QLayout class when I started my project, but due to all the possibilities in my layout I stopped using it and I'm doing the calculations myself (which created my current problem ;) ).
Re: Calculating button width
Nish, I take back my words. I was checking you suggestion with the debugger, and the debugger was fooling me. Don't know what's going on here, but if I use the debugger to check the button width, I get the standard button size (and I don't get to see the full text on the button) and if I trace the data and run it without the debugger I get the correct size. So, checking the width in the showEvent actually works (but is ofcourse a horrible solution but I guess I have no other choice).
Re: Calculating button width
glad it worked for you :)