[Kmymoney-devel] QWizard and combobox values

Fernando Vilas fvilas at iname.com
Tue Aug 24 03:54:55 CEST 2010


On Monday, August 23, 2010 19:20:56 Alvaro Soliverez wrote:
> It is being called.
> The code is in the constructor method and I added debug statements to
> verify the values at each stage.
> 
> ------------------------------------------------
> 
> PaymentFrequencyWizardPage::PaymentFrequencyWizardPage(QWidget *parent)
> 
>     : PaymentFrequencyWizardPageDecl(parent)
> 
> {
>   // Register the fields with the QWizard and connect the
>   // appropriate signals to update the "Next" button correctly
> 
>   registerField("paymentFrequencyUnitEdit",
> m_paymentFrequencyUnitEdit, "data",
> SIGNAL(currentDataChanged(QVariant)));
> 
[...]
> 
>   qDebug("payment frequency occurrence: %d",
> field("paymentFrequencyUnitEdit").toInt());
>   qDebug("current data: %d",
> m_paymentFrequencyUnitEdit->currentData().toInt());
> 
> }
> -----------------------------
> 
> And here is the debug output:
> 
> combo count: 16
> occur monthly index: 8
> data: 32
> payment frequency occurrence: 0
> current data: 32
> 

There is no property of KComboBox or QComboBox named "data". I think you may 
have to look at the currentIndex and currentText properties to get what you 
want. You could read the currentText property and then calculate the 
occurrence from there. Somehow that seems off, though.

-- 
Thanks,
Fernando Vilas
fvilas at iname.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100823/9fd227ae/attachment.sig 


More information about the KMyMoney-devel mailing list