Also, you can move the code that actually creates/adds the buttons to a separate class method and then call it from both the constructor and when you get a signal that new files were added. I am not sure what 'reloop constructor' means, but you do not want to try to call the constructor again.
The consensus is evidently to l hide and show a QLabel
Not my "consensus :) So far as I am aware, hiding can cause different layout redraw in at least some circumstances. I retain visibility but toggle foreground color to QColor(Qt::transparent) or toggle alpha color value between 255 (opaque) and 0 (transparent) on palette QPalette::setColor(QPalette::Text, colour).
Also, creating multiple QTimer::singleShot()s doesn't scale very well if you want to change the number of flashes or the interval between. Or of you have multiple labels to blink and you'd like them all to be "in sync". I use one regular repeating QTimer with a "countdown" and cancellation when it reaches 0.
I'm sorry if you feel I'm being hard on you. Quite a few of your questions are things you really should be able to solve for yourself, not ask questions of other people. It may not seem like it, but in the long run reading documentation and solving things for yourself is the only way to learn. I will leave it at that now.
I copied "ui_mainwindow.h" file from another build file
This may or may not be right, depending on just what you did where. The ui_mainwindow.h has to be regenerated every time you edit in Designer to change the mainwindow.ui file. If you later find that you make changes in Designer and these are not reflected in your code, you will have hit a problem. Just saying.
@JonB Not a big viewer at all. viewer is a simple QGraphicsView containing a QPixmapItem which is continually updated through another slot taking a signal from the camera thread every time it has a new frame, at 60fps.
Part of the issue seems to be with the debug build, which is obviously a fair bit slower than release. In release it doesn't really seem noticeable, though I imagine it might be on a slow system. Still, I do find the asynchronous behaviour of raise() interesting. I tried looking a bit at the source code, but didn't really get anywhere. Because it's not a problem in release, I guess I'll just leave it be for now. Thanks for the help, though, much appreciated.
Given that you are not using the designer, create your own QWidget *mainWidget and at some point call setCentralWidget(mainWidget). You can add your widgets onto your mainWidget before or after setting it as your central widget, I don't think it matters.
So just one "main widget", which you create, and then you set the main window to have that as its central widget.