#include#include int main(int argc, char *argv[]) { QDialog dialog; QVBoxLayout layout(&dialog); dialog.setFixedSize(300, 200); // add widgets to layout... dialog.exec(); return 0; }
#includeIn this example, we use the GTK+ library to create a dialog window using the gtk_dialog_new function. We then use several GTK+ functions to set the window title, fixed size, and add widgets to the dialog. This code is using the GTK+ library.int main(int argc, char *argv[]) { GtkWidget *dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), "Dialog Title"); // set fixed size gtk_window_set_resizable(GTK_WINDOW(dialog), false); gtk_window_set_default_size(GTK_WINDOW(dialog), 300, 200); // add widgets to dialog... gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return 0; }