Search code examples
c++qtqregion

Change geometry of QRegion


I implemented autohide feature using QRegion and mouseMove event. Now I have another problem. I need to change geometry of QRegion during runtime but I can't find any suitable command. Can you help me with this.


Solution

  • Just assign it another QRegion. Example:

    QRegion myRegion(/* ... */);
    
    // Change myRegion
    myRegion = QRegion(/* ... */);