I am new to qt and I am wondering how to open a form from the menu bar of another form. Basically what I want to do is allow the user to click on a menu item and open up a window. I have created a function in the code that looks like this.

Qt Code:
  1. void MainWindow::openNets()
  2. {
  3. netWindow n;
  4. n.show();
  5. }
To copy to clipboard, switch view to plain text mode 

I have defined this function as a slot and configured the triggered signal of the menu action to that slot. However, this is not working. Can anyone point me toward the proper way to do this?