Results 1 to 20 of 23

Thread: want to hide mainwindow at program start up

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    Join Date
    Jan 2011
    Posts
    39
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: want to hide mainwindow at program start up

    Hi MrDeath

    i tried using your code but problem was not solved because when check file exists output display second window but when check file does not exist mainwindow need tobe displayed but no window displayed (actually this->show() is not working). But when i used
    Qt Code:
    1. this->setAttribute(Qt::WA_DontShowOnScreen);
    To copy to clipboard, switch view to plain text mode 
    the problem is solved. though i think this is not a good solution. i need better solution.

    Hi kosasker

    i solved my problem using this:
    Qt Code:
    1. QFile file("E:/workplace/info.txt");
    2. QFile file1("E:/workplace/account_info.txt");
    3. if(file.exists() & file1.exists())
    4. {
    5. Form1 *frm1 = new Form1;
    6. this->setAttribute(Qt::WA_DontShowOnScreen);
    7. frm1->setVisible(true);
    8. }
    To copy to clipboard, switch view to plain text mode 

    but i need further better solution
    Last edited by masuk; 1st February 2011 at 17:43.

Similar Threads

  1. how to start a program in the background
    By JustinTerpstra in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2010, 23:51
  2. Start program with right button
    By Pablo128 in forum Qt Programming
    Replies: 1
    Last Post: 29th August 2010, 13:03
  3. Can't start a qt-program on embedded linux
    By Tschounes in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th June 2010, 23:39
  4. add a program to start menu
    By kpmsivachand in forum KDE Forum
    Replies: 1
    Last Post: 26th January 2009, 20:19
  5. How to hide mainwindow at program start up
    By palmer in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2008, 14:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.