Note::Note(Traymenu *trayMenuIn, QWidget *parent) :
ui(new Ui::Note){
ui->setupUi(this);
Note::Note(Traymenu *trayMenuIn, QWidget *parent){
ui = new Ui::Note;
ui->setupUi(this);
Both kinds are working. The above code is suggested by QtCreator, the lower code is what I would do if I had to write it on my own.
Note's private member is
Ui::Note *ui;