I created two main windows. How to find out if the 2nd window is open in QT?
QMainWindow *window1 = new QMainWindow(); QMainWindow *window2 = new QMainWindow();
Now I have to find that window2 is already open in my instance. How to know
You can use the visible property :
if (window2->isVisible()) { ... }
use QWidget#visible: http://doc.qt.io/qt-4.8/qwidget.html#properties
QWidget#visible
if(window1-> isVisible()) { //... }
Edited for comment below.