[Qt-interest] currentVerticalAlignmentChanged signal of QTextEdit
Nishant Sharma
nishant.031 at gmail.com
Fri Aug 27 12:36:11 CEST 2010
Hi andre,
Supose, I create my connection as:
connect( editor,
SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)),this,SLOT(verticalAlignChanged(VerticalAlignment
)));
then when I define the slot verticalAlignChanged(VerticalAlignment ) in my
.h file, it gives an error during compilation saying:
error: `VerticalAlignment' has not been declared
If I rechange it to verticalAlignChanged(QTextEdit::VerticalAlignment ) in
my .h file, the it gives following erros for my .cpp file:
error: variable or field `verticalAlignChanged' declared void
error: `int AotPlatFormatEdit::verticalAlignChanged' is not a static member
of `class AotPlatFormatEdit'
error: `VerticalAlignment' was not declared in this scope
error: expected `,' or `;' before '{' token
.cpp code is:
void Try::verticalAlignChanged(VerticalAlignment a)
{
cout << "got :: " << a << "\n";
}
On Fri, Aug 27, 2010 at 3:16 PM, Andre Somers <andre at familiesomers.nl>wrote:
> Op Vr, 27 augustus, 2010 11:12 am, schreef Nishant Sharma:
> > Hello,
> > I'm trying to add following signal-slot connection, but it gives an error
> > while my GUI loads:
> > connect( editor, SIGNAL(
> > currentVerticalAlignmentChanged(QTextEdit::VerticalAlignment
> > )),this,SLOT(verticalAlignChanged(QTextEdit::VerticalAlignment )));
> >
> > Here, editor is an object of class QTextEdit. My QT version is 3.3.6
> >
> > The error that comes is:
> > QObject::connect: No such signal
> >
> AotPlatTextEdit::currentVerticalAlignmentChanged(QTextEdit::VerticalAlignment)
> > QObject::connect: (sender name: 'formatedit_textEdit1')
> > QObject::connect: (receiver name: 'formatedit_1')
> >
> > Any suggestions as to what could be the possible error?
>
> That seems obvious, the error above is quite clear: you have no signal
> currentVerticalAlignmentChanged(QTextEdit::VerticalAlignment).
>
> André
>
>
>
--
Best Regards,
Nishant Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100827/e7fadb4b/attachment.html
More information about the Qt-interest-old
mailing list