Qt助手里面是這樣說的吧: Note that if a widget is set as modified, all its ancestors will also be set as modified. However, if you call setWindowModified(false) on a widget, this will not propagate to its parent because other children of the parent might have been modified. 看看我有無理解錯誤: 注: 如果一個視窗部件設定為被修改,那么它所有的祖先也會被設定為被修改. 不過,如果你在這個部件上呼叫setWindowModified(false),那么它不會影響它的父物件,因為它的父親還有其他子物件已經被改變... 按它的說法就是子物件call setWindowModified(true),那么父物件的windowModified屬性也會改變吧?? 還是要怎么理解???
uj5u.com熱心網友回復:
每一個QWidget都有一個windowModified屬性,如果該視窗的檔案存在沒有保存的變化,則windowModified設為true,否則設為false。轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/133180.html
標籤:其他技術討論專區
