marmistrz
marmistrz

Reputation: 6392

Invalid use of member in QSystemDeviceInfo

In my code I do

#include <QSystemDeviceInfo>

QSystemDeviceInfo devInfo;
if (devInfo.productName != "RM-680") { /* do something */}

While building I get an error:

error: invalid use of member (did you forget the '&' ?)

What am I doing wrong?

Upvotes: 1

Views: 333

Answers (1)

Mat
Mat

Reputation: 206737

productName is a member function. You need to call it.

if (devInfo.productName() != "RM-680")

Upvotes: 2

Related Questions