Results 1 to 5 of 5

Thread: Creating a widget on a QGraphicsView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    40
    Thanked 8 Times in 4 Posts

    Default Re: Creating a widget on a QGraphicsView

    Hi,

    Thanks for advice, but still I do not see my widget. There is 'something transparent" on or under the widget, but I do not see it.

    Maverick
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Creating a widget on a QGraphicsView

    You create the widget with the gv as parent. If you accidentally position this widget outside the bounds of the parent it will get clipped( you won't see it at all ).
    So, double check you give the correct coordinates( try (0,0)).

    Or, to make sure everything is ok with the widget and it can be seen, create it with a NULL parent and give it some position. It should appear at that position.

    Regards

Similar Threads

  1. Creating a square sized widget in a layout
    By cboles in forum Qt Programming
    Replies: 5
    Last Post: 22nd September 2008, 23:38
  2. Replies: 4
    Last Post: 9th August 2007, 08:20
  3. widget qgraphicsview scaling
    By mistertoony in forum Qt Programming
    Replies: 10
    Last Post: 20th March 2007, 22:46
  4. Creating advanced widget in a delegate.
    By bunjee in forum Qt Programming
    Replies: 8
    Last Post: 5th February 2007, 08:09
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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
  •  
Qt is a trademark of The Qt Company.