Qt-interest Archive, June 2007
[no subject]
Message 1 in thread
Hi All,
Iam using
Qt version :: 4.2.3
Operating System :: Linux.
Compiler :: MinGW.
In my application i have used QStackedWidget and added Pages to it.Each
Page contains RadioButton,ComboBox,etc,., When i do any action on this page
it is not been captured .
in code ...
ConfigurationPage::ConfigurationPage(QWidget *parent)
: QWidget(parent)
{
layoutWidget = new QWidget(this);
layoutWidget->setGeometry(QRect(159, 109, 191, 211));
vboxLayout = new QVBoxLayout(layoutWidget);
vboxLayout->setSpacing(6);
vboxLayout->setMargin(0);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
radioButton = new QRadioButton(layoutWidget);
}
myconstructor()
{
first = new ConfigurationPage(NULL);
second = new CPPage(NULL);
pagesWidget = new QStackedWidget(this);
pagesWidget->setGeometry(QRect(150, 30, 801, 477));
pagesWidget->addWidget(new ConfigurationPage);
pagesWidget->addWidget(new CPPage);
}
myfuction()
{
if(first->radioButton->isChecked())
{
///not able to do required operation
}
}
please correct me where iam wrong.
regards,
Basha J.P.M
Tata Consultancy Services
Mailto: basha.jpm@xxxxxxx
Website: http://www.tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
--
[ signature omitted ]
Message 2 in thread
Basha,
More code would be help in diagnosing the problem, but for starters,
take a look at http://doc.trolltech.com/4.2/signalsandslots.html. If you
want to capture changes in your GUI, you would capture the signal
emitted by the widget with a slot. Chances are the logic in your
my_function() would be your slot.
chris burke
phone: 617-621-0060 x195
email: cburke@xxxxxxx
skype: chris.burke0
Basha Jpm wrote:
> Hi All,
>
> Iam using
>
> Qt version :: 4.2.3
> Operating System :: Linux.
> Compiler :: MinGW.
>
> In my application i have used QStackedWidget and added Pages to it.Each
> Page contains RadioButton,ComboBox,etc,., When i do any action on this page
> it is not been captured .
>
> in code ...
>
> ConfigurationPage::ConfigurationPage(QWidget *parent)
> : QWidget(parent)
> {
>
> layoutWidget = new QWidget(this);
> layoutWidget->setGeometry(QRect(159, 109, 191, 211));
>
> vboxLayout = new QVBoxLayout(layoutWidget);
> vboxLayout->setSpacing(6);
> vboxLayout->setMargin(0);
> vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
>
> radioButton = new QRadioButton(layoutWidget);
>
> }
>
> myconstructor()
>
> {
> first = new ConfigurationPage(NULL);
> second = new CPPage(NULL);
>
>
> pagesWidget = new QStackedWidget(this);
> pagesWidget->setGeometry(QRect(150, 30, 801, 477));
>
> pagesWidget->addWidget(new ConfigurationPage);
> pagesWidget->addWidget(new CPPage);
>
> }
>
> myfuction()
> {
>
> if(first->radioButton->isChecked())
> {
>
>
> ///not able to do required operation
> }
>
>
> }
>
>
> please correct me where iam wrong.
>
>
> regards,
> Basha J.P.M
> Tata Consultancy Services
> Mailto: basha.jpm@xxxxxxx
> Website: http://www.tcs.com
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]