I think you have not undertood my problem.
If i need to chage the font at runtime then your code will not allow me that.Because you have hardcoded the font.
I already mentioned that there is toolbar which has QFontComboBox which shows list of font.Selected font from this combobox is then i am trying to give it to my customized item.
e.g.
void customizedItem
::setItemFont(QFont ft
) // which is called from font toolbar {
m_textFont = ft ; // at this point i m getting exception which i have pasted below
}
#if defined(QT_NO_EXCEPTIONS)
receiver
->qt_metacall
(QMetaObject::InvokeMetaMethod, method, argv ? argv
: empty_argv
);
#else
try
{
receiver
->qt_metacall
(QMetaObject::InvokeMetaMethod, method, argv ? argv
: empty_argv
);
}
catch (...)
{
locker.relock();
QObjectPrivate::resetCurrentSender(receiver, ¤tSender, previousSender);
--connectionLists->inUse;
Q_ASSERT(connectionLists->inUse >= 0);
if (connectionLists->orphaned && !connectionLists->inUse)
delete connectionLists;
throw;
}
#endif
void customizedItem::setItemFont(QFont ft) // which is called from font toolbar
{
m_textFont = ft ; // at this point i m getting exception which i have pasted below
}
#if defined(QT_NO_EXCEPTIONS)
receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
#else
try
{
receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
}
catch (...)
{
locker.relock();
QObjectPrivate::resetCurrentSender(receiver, ¤tSender, previousSender);
--connectionLists->inUse;
Q_ASSERT(connectionLists->inUse >= 0);
if (connectionLists->orphaned && !connectionLists->inUse)
delete connectionLists;
throw;
}
#endif
To copy to clipboard, switch view to plain text mode
Note : even i am unable to modify any member variable my cusomized item in this setItemFont() method . i.e same exeption as above
Is anything i doing wrong.
Thanks
Bookmarks