[Qt-creator] Qt Quick UI example code

Ariel Molina ariel at edis.mx
Fri Oct 31 14:31:42 CET 2014


Your intro is also misleading but ignoring it you dont need anything related to QtQuick. Thats purely traditional QtWidgets, in that case the pointer might work as you say. Inherit instead, then remove the setup(), you are free to do that.

Ariel

--
(enviado desde un dispositivo movil)
Ariel Molina R.
Oficina: 222 3723196
Movil: 2226 758874


> El 31/10/2014, a las 7:25 a.m., John Idarraga <johnid at nikhef.nl> escribió:
> 
> Yeah, i think the subject of my message might be a bit misleading. But the code and the question are consistent.
> 
> J.
> 
> 
>> On 31-10-14 14:23, Ariel Molina wrote:
>> Hi,
>> 
>> From the subject it seems you want a QtQuick App, and the code shows a Widget based app. So there must be some misunderstanding on the first place.
>> 
>> Ariel
>> 
>> --
>> (enviado desde un dispositivo movil)
>> Ariel Molina R.
>> Oficina: 222 3723196
>> Movil: 2226 758874
>> 
>> 
>>> El 31/10/2014, a las 5:41 a.m., John Idarraga <johnid at nikhef.nl> escribió:
>>> 
>>> Hello all,
>>> 
>>> I downloaded the last version of QtCreator (3.2.2 Built on Oct 10 2014
>>> 11:17:04 From revision 34971be5cc).  I proceed to start a new
>>> Application project  --> Qt Quick UI.  The template code generated for
>>> the constructor of the class goes as follows
>>> 
>>> SpidrMpx3Eq::SpidrMpx3Eq(QWidget *parent) :
>>>     QMainWindow(parent),
>>>     ui(new Ui::SpidrMpx3Eq)
>>> {
>>>     ui->setupUi(this);
>>> }
>>> 
>>> if for instance i want to connect a signal to a slot for a given object
>>> I need to do
>>> 
>>> connect( ui->_myButton, .... )
>>> 
>>> My question is.  Why not letting the Ui setup by doing
>>> 
>>> this->setupUi(this);
>>> 
>>> and then simply use the inherited public member "_myButton"
>>> 
>>> connect( _myButton, .... )
>>> 
>>> what's the use for the ui pointer here ?
>>> 
>>> thank you,
>>> 
>>> J.
>>> 
>>> _______________________________________________
>>> Qt-creator mailing list
>>> Qt-creator at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/qt-creator
> 



More information about the Qt-creator mailing list