Results 1 to 4 of 4

Thread: Someone want to join the OpenRcon project?

  1. #1
    Join Date
    Mar 2010
    Posts
    34
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Someone want to join the OpenRcon project?

    Hi!

    Someone eant to join my opensource project OpenRcon?

    http://sourceforge.net/projects/openrcon/

    Halvor.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Someone want to join the OpenRcon project?

    The forum "Qt-based Software" would have been a more suitable place for your query but anyway. I was curious how your code would look like, so I looked into it and must tell you that that kind of function is not a good idea:
    Qt Code:
    1. void MainWindow::on_actionAbout_triggered()
    2. {
    3. menuHelp_About = new AboutDialog;
    4. menuHelp_About->show();
    5. }
    To copy to clipboard, switch view to plain text mode 
    Why? Everytime this slot is called you create a new AboutDialog without deleting the old one. Result your application will block more and more memory. So you maybe better use
    Qt Code:
    1. void MainWindow::on_actionAbout_triggered()
    2. {
    3. if (0 == menuHelp_About)
    4. menuHelp_About = new AboutDialog;
    5. menuHelp_About->show();
    6. }
    To copy to clipboard, switch view to plain text mode 

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

    Zmrca (26th April 2010)

  4. #3
    Join Date
    Mar 2010
    Posts
    34
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Someone want to join the OpenRcon project?

    When i tryd this it got my application crashed! So what sould i do to get it work?

  5. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Someone want to join the OpenRcon project?

    well, you must of course initialize menuHelp_About first. So your c-tor have to look like:
    Qt Code:
    1. MainWindow::MainWindow(/*...*/) : QMainWindow(/*...*/), menuHelp_About(0)
    2. {
    3. //...
    4. }
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. MainWindow::MainWindow(/*...*/) : QMainWindow(/*...*/)
    2. {
    3. menuHelp_About = 0;
    4. //...
    5. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QSqlRelationalTableModel & Left Join
    By mhbeyle in forum Qt Programming
    Replies: 3
    Last Post: 21st December 2009, 12:40
  2. Replies: 1
    Last Post: 8th November 2009, 12:49
  3. Thread does not join
    By AlphaWolf in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2009, 08:09
  4. Outer join in QSqlRelationalTableModel
    By Banjo in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2008, 23:19
  5. QDataTable + join
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2006, 12:56

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.