Results 1 to 2 of 2

Thread: How to clear added widgets from "QGraphicsProxyWidget".

  1. #1
    Join Date
    Jul 2010
    Posts
    38
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to clear added widgets from "QGraphicsProxyWidget".

    Hi Friends,

    I am writing a application that clears the added controls every 200 ms.

    - I have used QTimer for the timer.
    - I have used "QGraphicsProxyWidget" for adding the widgets(some pushbutton etc) on the "QGraphicsView"

    Now I want to clear the widgets at every timer instance as I got the updated data for the "QGraphicsView".

    I have used widget visibility concept to do this ("isVisible"), But I got crashes and incorrect results.

    Is there any way to clear all the added widgets from the QGraphicsProxyWidget.

    How to clear added widgets from "QGraphicsProxyWidget".

  2. #2
    Join Date
    Jul 2010
    Posts
    38
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to clear added widgets from "QGraphicsProxyWidget".

    Quote Originally Posted by pastispast View Post
    Hi Friends,

    I am writing a application that clears the added controls every 200 ms.

    - I have used QTimer for the timer.
    - I have used "QGraphicsProxyWidget" for adding the widgets(some pushbutton etc) on the "QGraphicsView"

    Now I want to clear the widgets at every timer instance as I got the updated data for the "QGraphicsView".

    I have used widget visibility concept to do this ("isVisible"), But I got crashes and incorrect results.

    Is there any way to clear all the added widgets from the QGraphicsProxyWidget.

    How to clear added widgets from "QGraphicsProxyWidget".
    I have resolve this isue using "setVisible".

    But now I am facing one more problem. I have to select the widgets on the screen. When the widget selects then round selection sholud appear on the screen. To this I am using some widget(pushbutton) style sheet as:

    setStyleSheet(QPushButtonressed{ \
    image: url(:/img/images/image.png); \
    background-color:rgb(203, 203, 203, 200);\
    border-styleutset; \
    border-radius:15px;}");

    It works on the normal widgets but when I use it in the "QGraphicsView" then some white rectangle shows around the widget (pushbutton).

    How can I remove the extra white rectangle selection (or make transparent it)?
    Last edited by pastispast; 25th July 2010 at 05:51. Reason: Some Modification

Similar Threads

  1. How to "CLEAR" data on QTcpSocket
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2010, 06:38
  2. Replies: 1
    Last Post: 15th June 2010, 07:49
  3. Replies: 3
    Last Post: 8th July 2008, 20:37
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 16:58

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.