Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] problem opening immediately to fullscreen
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] problem opening immediately to fullscreen

Scheduled Pinned Locked Moved Solved General and Desktop
1 Posts 1 Posters 263 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmh4514
    wrote on last edited by pmh4514
    #1

    ++ 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;
        w.showMaximized();
    
        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?

    Thanks!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved