Results 1 to 2 of 2

Thread: smal, non-rectangular interactive widget approaches

  1. #1
    Join Date
    Jul 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: smal, non-rectangular interactive widget approaches

    I have an application where I want to add some user settable bookmarks big, scrollable plot. I'll have some vertical, transparent lines but above these I thought I'd have downward pointing triangles as handles for the user to move. I figured I could make these triangle markers not be widgets at all and have the containing bookmark area widget handle mouse interactions and check which bookmark the mouse may be over seeing if it's in a QRegion for the bookmark handle image. But given other desires for interaction I thought I'd check if there was a good way to leverage a QWidget for such objects. They may partially overlap each other at times and so the notion of being over the triangle rather than just the enclosing rectangle is important. Any thoughts?

    Thanks
    John


    Added after 1 57 minutes:


    guess the answer is using QWidget::setMask. I didn't notice before that it also affected mouse clicks. Now to discover if widgets behind but visible will get those clicks.
    Last edited by jcbikeski; 15th August 2011 at 21:06.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: smal, non-rectangular interactive widget approaches

    I don't know what your application is supposed to do but consider using Graphics View instead of QWidget approach for your system.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Why a square button becomes rectangular?
    By marc2050 in forum Newbie
    Replies: 1
    Last Post: 3rd May 2011, 05:46
  2. Drawing text within rectangular in textbrowser
    By addu in forum Qt Programming
    Replies: 4
    Last Post: 21st September 2009, 06:21
  3. Replies: 1
    Last Post: 29th November 2008, 12:37
  4. how to rotate a rectangular region of awidget
    By babu198649 in forum Newbie
    Replies: 2
    Last Post: 17th March 2008, 13:39
  5. non-rectangular windows , integrating qt
    By liorm in forum Qt Programming
    Replies: 3
    Last Post: 29th April 2007, 12:56

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.