#include <QtWidgets>int main(int argc, char *argv[]){ QApplication app(argc, argv); QWidget * win = new QWidget; printf("winID = %p\n", (void *) win->winId()); QLineEdit * edit = new QLineEdit(win); WId id = edit->winId(); printf("editID = %p\n", (void *) id); win->show(); return app.exec();}