How to use an object created in the UI Designer
-
wrote on 10 Feb 2016, 10:18 last edited by kenyanke 2 Oct 2016, 10:22
This could be a stupid question to ask...
I have an application that mounts onto a QFrame to be displayed on screen, I want to add a Frame onto a Form and display my application on it.
// QFrame* MainFrame = new QFrame;
// MainFrame->setWindowTitle("Sugarscape");
// MainFrame->resize(400, 400);
// MainFrame->show();// Create a SFML view inside the main frame
// Sugarscape* SFMLView = new Sugarscape(MainFrame, QPoint(20, 20), QSize(360, 360));
// SFMLView->show();The above code I'm creating explicitly in my main, but I want to create one using the form, but don't know how to access the objects reference. (can only access the slots for resize, setWindowTitle, destroyed etc)
e.g... but for the actual frame in ClassName class
ClassName::On_MainFrame_setWindowTitle(QString &title)
{}
-
wrote on 10 Feb 2016, 10:49 last edited by
usually UI objects created in designer are accessible using ui variable. for example ui->form. Not sure if thats what you want.
-
usually UI objects created in designer are accessible using ui variable. for example ui->form. Not sure if thats what you want.
wrote on 10 Feb 2016, 11:19 last edited by kenyanke 2 Oct 2016, 11:27Thank you.
1/3