I've been having trouble with Sigil's preview window, and it also extends to PageEdit. I found
this thread that was the closest thing to what I'm experiencing. I tried the suggestion about setting the QT_OPENGL variable and launching Sigil and it seems to get the preview behaving correctly. However I'm not sure what that means for the bigger picture and what's the best way to eliminate the problem when launching Sigil normally as an app.
I started a new thread because the one above is 2 years old and also because I don't have anything unusually patched on my machine like the OP there did. I have an M1 13" MacBook Pro running macOS 12.4. I do do some stuff with the command line, although I don't know if anything I've done/installed would be interfering with QT environment stuff.
I also don't quite know what the interaction between environment variables and apps launched in the GUI is. Obviously if you launch the app using the open command after setting the variable, it uses that, but can one set it somewhere that it would be used any time the app is opened normally? My default shell is currently set to fish, and when I set the QT_OPENGL variable there, it seems to be working every time I launch Sigil or PageEdit, but at this point I don't feel quite certain about any of this.
Unfortunately, I don't know exactly when this problem started or what might have changed around that time. It seemed like it occurred intermittently at first and now it's been all the time.