Although I have read the answers to this question
QT/C++ - Accessing MainWindow UI from a different class and searched the whole www for quite some time - I don't get it working.
I was given the task to recreate an applications UI using QT Designer. Unfortunately there was already some UI spread all over several classes (the team then came across the idea, that using QT but not using the Designer however "handcoding" the UI seems to make little sense)
So now my job is to untangle the open ends, create a GUI (done that) find every possible signal and slot and put it all together to look nice and clean.
So much for the theoretical part.
Addition: I have very little experience in C++ and I seem to be getting nowhere searching for answers and don't have the time to read whole books until tomorrow, otherwise I wouldn't ask.
I am kind of going nuts about two things:
A) My mainwindow.cpp, mainwindow.h and mainwindow.ui need to be linked into other files e.g. the previewwidget.cpp... the previewwidget.cpp had a lot of code like:
buttonLayout->addWidget(fpsSpinBox, 0, Qt::AlignCenter);
buttonLayout->addWidget(playButton, 0, Qt::AlignCenter);
buttonLayout->addWidget(backwardButton, 0, Qt::AlignCenter);
apparently I replaced it by creating the corresponding buttons in Designer. now in the same file theres the connect SIGNAL SLOT entries (I added the "ui->")
connect(ui->playButton, SIGNAL(clicked()), this, SIGNAL(playButtonClicked()));
connect(ui->stopButton, SIGNAL(clicked()), this, SIGNAL(stopButtonClicked()));
connect(ui->forwardButton, SIGNAL(clicked()), this, SIGNAL(forwardButtonClicked()));
but the compiler keeps telling me:
\preview\previewwidget.cpp:77: Error:'ui' was not declared in this scope
I put the ui_mainwindow.h into the header but that wasn't the solution either.
B) This Question is probably related very closely to the first one: since the Designer strickly keeps model/view/controll apart I need to rewrite the signals and slots to match the new UI - has anyone got a good tutorial or any hints for me how to do this fast and uncomplicated?
Any help would be greatly appreciated.