Solved Create windows with code
-
This post is deleted! -
Hi @mandruk1331,
Perhaps not the simplest example, but pretty close to it:
- https://github.com/pcolby/generic-qt-app/blob/master/src/main.cpp
- https://github.com/pcolby/generic-qt-app/blob/master/src/widgets/mainwindow.cpp
- https://github.com/pcolby/generic-qt-app/blob/master/src/widgets/mainwindow.h
Creates a single main-window application, with a version-string in the Window title, and automatic save/restore of the window position (both of which you can remove).
Cheers.
-
I have created it with QInputDialog, but now I get an error: Widgets must be created in the GUI thread. What can be the problem?
-
What does the code for you QInputDialog look like? How do you instantiate it?
-
@Paul-Colby I fixed the problem. The problem was cause because I have been creating a Dialog box not in the main thread