Results 1 to 3 of 3

Thread: Program does not appear in TaskBar

  1. #1
    Join Date
    Jul 2007
    Posts
    30
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Question Program does not appear in TaskBar

    I have a program that seems to (both in XP and Vista) not show on the taskbar when it is launched.

    I launch the program but it never shows up on my task bar.

    Here's how I initiate my program:
    Qt Code:
    1. int main(int argc, char *argv[]){
    2. QApplication app(argc, argv);
    3. QString stylesheet("");
    4. app.setStyleSheet(stylesheet);
    5. PMain pm(0);
    6. return app.exec();
    7. }
    8.  
    9. PMain::PMain(QWidget *parent) : QWidget(parent) {
    10. qmw = new QMainWindow(this);
    11. Log("P system started.");
    12. pui.setupUi(qmw);
    13. rows = 10;
    14. qmw->show();
    15. connect(pui.actionSave, SIGNAL(triggered()), this, SLOT(s_Save()));
    16. connect(pui.actionSave_As, SIGNAL(triggered()), this, SLOT(s_SaveAs()));
    17. connect(pui.actionOpen, SIGNAL(triggered()), this, SLOT(s_Open()));
    18. }
    To copy to clipboard, switch view to plain text mode 

    I used Designer to make my GUI which is what pui is.
    I compile using qmake, make...

    I don't know if it is related but there is also an error where when I click on the "X" of the program, it closes but the process doesn't disappear from task manager.

    I'm using Qt 4.4 with mingw.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Program does not appear in TaskBar

    Presumably you wanted something like this:
    Qt Code:
    1. int main(int argc, char *argv[]){
    2. QApplication app(argc, argv);
    3. QString stylesheet("");
    4. app.setStyleSheet(stylesheet);
    5. PMain pm(0);
    6. pm.show(); // <--
    7. return app.exec();
    8. }
    9.  
    10. class PMain : public QMainWindow // <--
    11. {
    12. ...
    13. };
    14.  
    15. PMain::PMain(QWidget *parent) : QMainWindow(parent) {
    16. Log("P system started.");
    17. pui.setupUi(this); // <--
    18. rows = 10;
    19. connect(pui.actionSave, SIGNAL(triggered()), this, SLOT(s_Save()));
    20. connect(pui.actionSave_As, SIGNAL(triggered()), this, SLOT(s_SaveAs()));
    21. connect(pui.actionOpen, SIGNAL(triggered()), this, SLOT(s_Open()));
    22. }
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    Arsenic (21st July 2008)

  4. #3
    Join Date
    Jul 2007
    Posts
    30
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Program does not appear in TaskBar

    Thanks a lot Honorable Sir.

Similar Threads

  1. how to execute program that using qsqlite on different machine?
    By mismael85 in forum Installation and Deployment
    Replies: 2
    Last Post: 19th March 2008, 21:09
  2. Replies: 19
    Last Post: 21st January 2008, 09:13
  3. Replies: 5
    Last Post: 29th October 2007, 22:49
  4. Version setting in QT Program
    By sabeesh in forum Qt Programming
    Replies: 4
    Last Post: 24th October 2007, 12:07
  5. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.