If you created that var on the stack, in some function, it won't work, because the object will get destroyed as soon as the function exits.I created a var of my new QMainWindow type and putted his method show(), but this new QMainWindow isn't showed!!
Create the window instance on the heap(with new), and don't forget to delete it when you finish using it/or set the delete on close flag.
Bookmarks