Hi Santhosh
Note that if I do the same code in MainWindow function, it's the same behavior. So, it isn't an issue of a reset called many times. In fact try out my code on the first resize event and you will see the issue.
Thanks
Sean
Hi Santhosh
Note that if I do the same code in MainWindow function, it's the same behavior. So, it isn't an issue of a reset called many times. In fact try out my code on the first resize event and you will see the issue.
Thanks
Sean
Ok your problem is not with App freezing, you App works as expected when QLabel is created in resizeEvent(). the problem is when a widget is created with a parent and not added to a layout, it is my default placed at parent's (0,0), which in this is case is overlapping with the menu bar and you cannot click on menu any more.
Just try this and you can see for yourself
Qt Code:
To copy to clipboard, switch view to plain text mode
QMainWidget has a special layout, you will need to use setCentralWidget(label) after QLabel creation to make the menu work
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Thanks !
Sean
Bookmarks