Results 1 to 4 of 4

Thread: QMainWindow: create onStartup-like function [SOLVED]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QMainWindow: create onStartup-like function [SOLVED]

    My application has a QMainWindow and I need to run one of its functions after the QApplicaiton event engine is running. Any suggestions?

    Qt Code:
    1. #include <QApplication>
    2. #include "mainwindow.h"
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7. MainWindow mainWin;
    8. mainWin.show();
    9. return app.exec(); //Right after this, event engine is running. How to send something to my mainWin to run my onStarup()? signal? event??
    10. }
    11.  
    12. //MainWin...
    13. MainWindow::MainWindow() {}
    14. MainWindow::onStartup() {} //Call this, display a QProgressBar and do some stuff
    To copy to clipboard, switch view to plain text mode 
    Last edited by thomaspu; 11th October 2012 at 14:43.

Similar Threads

  1. Create QMainWindow in runtime
    By qt_developer in forum Newbie
    Replies: 2
    Last Post: 25th June 2012, 19:22
  2. Problem with using raise function on QMainWindow
    By yartov in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2008, 09:14
  3. how to create a new function
    By tommy in forum Qt Programming
    Replies: 3
    Last Post: 10th November 2007, 17:08
  4. Modal dialog in QMainWindow's event() function
    By tanminh in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2007, 09:46
  5. run function before closing QMainWindow
    By raphaelf in forum Newbie
    Replies: 1
    Last Post: 31st August 2006, 09:21

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.