Re: ui class access problem
if "ui" refers to a QDesigner form you cannot access elements by name directly.
After you call "setupUi()" the form elements become children of the QWidget you passed to setupUi.
In this case you could use QObject::findChild method to find child by name.
Re: ui class access problem
Thanks for the help, so I f i understood correctly I could do this: websurf is the class name ui,
in websurf.cpp:
void websurf::on_details_clicked()
{
QString a = "webView4";
QWebView *bla = parentWidget->findChild<QWebView *>(a); //this give me 2 errors: one is invalid use of menber, and -> is not a pointer
bla->setUrl(QUrl("http://www.bla.com"));
}
this give me 2 errors: one is invalid use of menber
void websurf as been declare as private slot in websurf.h
certainly something not correct I did,
Thanks for your help
Re: ui class access problem
got it functioning...(parentWidget ->this....)
Thanks a thousand time....
Re: ui class access problem
Maybe I get you wrong but you could simply use: ui->webView4->setUrl().