ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #21245
Re: connecting C++ to a QML button
Err, you should probably keep using QString. Just switch your slot to
accept a QString object instead of a pointer to one, rather.
On Fri, Jun 17, 2016 at 9:14 AM, Michael Terry <michael.terry@xxxxxxxxxxxxx>
wrote:
> Use SLOT(cppSlot(const QString *)) instead of SLOT(cppSlot(QString)).
>
> 2016-06-17 9:13 GMT-04:00 Matthias Apitz <guru@xxxxxxxxxxx>:
>
>> El día Friday, June 17, 2016 a las 09:00:57AM -0400, Michael Terry
>> escribió:
>>
>> > Try adding:
>> > objectName: "dialButton"
>> >
>> > to dialButton?
>> >
>> > "id" is for inside-qml references. "objectName" is for findChild and
>> ilk.
>>
>> Thanks. This seems to find the object, but gives a new problem:
>>
>> QObject::connect: No such slot MyClass::cppSlot(QString)
>> QObject::connect: (sender name: 'dialButton')
>>
>>
>>
>> --
>> Matthias Apitz, ✉ guru@xxxxxxxxxxx, ⌂ http://www.unixarea.de/ ☎
>> +49-176-38902045
>> "Die Verkaufsschlager des Buchmarkts geben Auskunft über den Zustand
>> einer Gesellschaft bzw.
>> sind, was diese Zeiten angeht, Gradmesser fortschreitenden Schwachsinns.
>> ..." (jW 19.05.2016)
>>
>
>
>
> --
> -mt
>
--
-mt
Follow ups
References