pushButt."/> pushButt."/> pushButt"/>
خرید بک لینک

Vote count: 0

I am just starting a Qt tutorial, and I am also a begier level of C++. In the Qt tutorial, there is an example that use statement: "ui->pushButton->setText("Hello");" to set the button's text. I understand that we can use "->" operator to allow an pointer to access member of class. In this case, "pushButton->setText("Hello")", but I just don't understand the meaning of "ui->pushButton", I search some answers explained that the "ui" hold the reference of the "pushButton", but how this can be done? "pushButton" is a pointer to the object , is not a member of the class, we can use "->" to put the object address to the "ui" pointer?

Sorry for my bad English language, I may confused you. I wish someone can give me a clear explanation, thanks in advance.

asked 1 min ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: شنبه 26 تير 1395 ساعت: 13:41

صفحه بندی