[Qt-interest] need help in qt programing

Gopalakrishna Bhat gopalakbhat at gmail.com
Mon Nov 15 05:48:52 CET 2010


Hi,

Please do not mail me privately. Mailing to mailing list increases the
probability of getting the answers.

btw at the moment I do not know the answers for your question. :(

With regards,
Gopalakrishna

On Mon, Nov 15, 2010 at 9:55 AM, rashmi yadav <rashufatty at gmail.com> wrote:
>
> for (int y = 0; y < size.height(); ++y) {
>         iconGrid[y].resize(size.width());
>         for (int x = 0; x < size.width(); ++x) {
>             RoundRectItem *rect = new RoundRectItem(iconRect, iconColor,
> this);
>             rect->setToolTip(QString("hello %1").arg(x));
>             rect->setZValue(1);
>             rect->setPos(posForLocation(x, y, size));
>             rect->setPixmap(pixmaps.at(n++ % pixmaps.size()));
>             iconGrid[y][x] = rect;
>         }
>     }
> i have done following changes to display text message.wen i compile program
> i have no error but wen i execute this program i cant see any text message
> on screen. could you plz help me.
> On Fri, Nov 12, 2010 at 1:45 PM, rashmi yadav <rashufatty at gmail.com> wrote:
>>
>>    hey,
>> i have the following code to display icon description when cursor is
>> placed on it.
>>     const QString tooltip = "hello";
>>     QPoint pos(0,0);
>>     selectionItem->QToolTip::showText(pos,tooltip);
>> when i compile this program i have following error:
>>
>> root at lxdevenv:/usr/qt-everywhere-opensource-src-4.7.0/examples/graphicsview/padnavigator#
>> make
>> g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT
>> -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB
>> -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
>> -I../../../mkspecs/qws/linux-x86-g++ -I. -I../../../include/QtCore
>> -I../../../include/QtNetwork -I../../../include/QtGui -I../../../include
>> -I.moc/release-shared-emb-x86 -I.uic/release-shared-emb-x86 -o
>> .obj/release-shared-emb-x86/padnavigator.o padnavigator.cpp
>> padnavigator.cpp: In constructor ‘PadNavigator::PadNavigator(const QSize&,
>> QWidget*)’:
>> padnavigator.cpp:102: error: ‘QToolTip’ is not a base of ‘RectItem’
>> make: *** [.obj/release-shared-emb-x86/padnavigator.o] Error 1
>> i really didnt understand what has gone wrong could you help me plz.
>> i have included corresponding header files also
>> On Thu, Nov 11, 2010 at 4:42 PM, rashmi yadav <rashufatty at gmail.com>
>> wrote:
>>>
>>> hi,
>>> see i have application like this which draws roundrectangle when cursor
>>> is placed on particular icon now what i need is i need to draw one more
>>> rectangle outside roundrectangle. when cursor is placed on icon i need inner
>>> rectangle along with outer Roundrectangle displayed on screen
>>> RoundRectItem *selectionItem = new RoundRectItem(QRectF(-60, -60, 120,
>>> 120), Qt::gray, pad);
>>> how can i do it. hope im clear in my question. plz do help
>>> On Thu, Nov 11, 2010 at 4:40 PM, rashmi yadav <rashufatty at gmail.com>
>>> wrote:
>>>>
>>>> thanks for help.
>>>> how can i emboss icon wen cursor is placed on it.?
>>>> regards
>>>> yadav
>>>>
>>>> On Thu, Nov 11, 2010 at 4:32 PM, Gopalakrishna Bhat
>>>> <gopalakbhat at gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> You can use qtoolbar of placing the icons inside QToolButton. For
>>>>> displaying a message when cursor is placed on particular icon use
>>>>> QToolButton::setToolTip() feature.
>>>>>
>>>>> With regards,
>>>>> Gopalakrishna
>>>>>
>>>>>
>>>>> > displayed explaining the functionality of icon
>>>>>
>>>>> On Thu, Nov 11, 2010 at 4:04 PM, rashmi yadav <rashufatty at gmail.com>
>>>>> wrote:
>>>>> > hey all,
>>>>> > i am new to qt. i need to develop an application in qt which contains
>>>>> > list
>>>>> > of icon wen cursor is placed on particular icon message box should be
>>>>> > displayed explaining the functionality of icon. and also i need to
>>>>> > emboss
>>>>> > icon wen cursor placed on that could you help me plz
>>>>> > thanks
>>>>> > regards
>>>>> > yadav
>>>>> > _______________________________________________
>>>>> > Qt-interest mailing list
>>>>> > Qt-interest at trolltech.com
>>>>> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> My blog http://gkbhat.blogspot.com
>>>>
>>>
>>
>
>



-- 
My blog http://gkbhat.blogspot.com




More information about the Qt-interest-old mailing list