qt 创建新窗口问题(括号加与不加的问题)

thermaldialog = new ThermalDialog;

thermaldialog = new ThermalDialog();
有什么区别 好像效果一样

(ThermalDialog 是一个继承与QDialog的类;thermaldialog 是一个指向ThermalDialog的指针)

没有什么区别,thermaldialog = new ThermalDialog,调用的也是无参构造函数,相当于thermaldialog = new ThermalDialog()

没区别,一样,不加括号,系统默认执行无参的构造函数