Important: Please read the Qt Code of Conduct -

[SOLVED] problem opening immediately to fullscreen

  • ++ SOLVED++
    The problem described below was because I had included CONFIG+=console in my PRO file

    Hi, I'm using Qt 5.8, MSVC2015 64bit, Widgets application.

    A very simple test app:

    int main(int argc, char *argv[])
        QApplication a(argc, argv);
        MainWindow w;
        return a.exec();

    MainWindow is just an empty widget with preferred horizontal and vertical size policies and no code within its constructor other than the call for ui->setupUi(this)

    When I run the project from inside Qt Creator, I see what I expect to see - an empty full-screen window appears immediately.

    However, when I run the compiled EXE by double-clicking it from Windows explorer, I first see a small black window (much like a command prompt but without the prompt) which lingers on screen for several seconds until finally the full-screen empty window appears. When I then close the full-screen MainWindow by clicking the X button in the top-right, that window closes, and I can see the original small black window left behind, and then that closes.

    How can I eliminate this small black window that appears first?


Log in to reply