[Qt-interest] QGraphicsItem can not show the cursor
Fred Duarte
fred.duarte at openbossa.org
Tue Apr 28 04:29:59 CEST 2009
The way i made it transparent was by changing the widget's pallete.
I'm using this piece of code:
*QPalette palette(widget->palette());
palette.setColor(widget->backgroundRole(), Qt::transparent);
**widget->setPalette(**palette);*
and it works fine. But i still can't make the damm cursor appear
on the screen when i attach the widget to a scene.
Ideas, anyone?
On Mon, Apr 27, 2009 at 5:48 PM, christopherx <christopherx at xandros.com>wrote:
> Sorry Fred, My statment in last message DOES NOT working. What's yours ?
>
> Thanks,
>
> Fred Duarte wrote:
>
>> I'm having a similar problem.
>> My QLineEdit object inside a QGraphicsProxyWidget is not showing
>> the cursor. Even when I click on the widget and it gain focus, the cursor
>> is
>> still hidden.
>> A made just a small change on my widget, where i set the background to
>> transparent. But that's it. I still add it to the scene through a
>> QGraphicsProxyWidget.
>>
>> On Mon, Apr 27, 2009 at 11:28 AM, christopherx <christopherx at xandros.com<mailto:
>> christopherx at xandros.com>> wrote:
>>
>> Hello all:
>>
>> I have a problem with cursor is not showing in the QEditline.
>> Please let me know if you know the issue. Thanks.
>> I have a widget which contains a QEditline an a few QLabel, a
>> QListview and a buttonBox. And the widget is sign to a QGraphicsItem
>> as a proxywidget as :
>>
>> grpItem = new GraphicsRectItem(QRectF,
>> myWidget->palette().window(), myWidget).
>>
>> And the grpItem is a child of a baseItem (which is the same
>> type as
>> grpItem, a GraphicsRectItem). The baseItem is added to a
>> QGraphicsScene, and the scene is a member of set to a GraphicsView.
>>
>> After the creation of the grpItem, I did a QEditLine->setFocuse(),
>> and it works, the edit line does got the keyboard focus, but I
>> can't see
>> the Cursor unless I click on the widget/or editline. Also, the tab
>> order is not working on the widget.
>>
>> Please help.
>>
>> Thanks,
>> --
>>
>> Christopher Xu
>> <http://www.xandros.com/>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>>
>>
>> --
>> Frederico Simas Duarte
>> MLS - Mobile Linux Software
>> INDT - Nokia Institute
>>
>
> --
>
> Christopher Xu
> <http://www.xandros.com/>
>
>
--
Frederico Simas Duarte
MLS - Mobile Linux Software
INDT - Nokia Institute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090427/8c30834a/attachment.html
More information about the Qt-interest-old
mailing list