Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Any Qt Shape Widgets packages?

Any Qt Shape Widgets packages?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jiapei100J Offline
    jiapei100J Offline
    jiapei100
    wrote on last edited by
    #1

    Hi, all:

    I'm just wondering is there any open packages I can use directly:

    1. Shape class ---- better 2D and 3D
      a) drag any shape into a QGraphicsView ( I did it already)
      b) drag and click/select for some specific shapes: for example, for a line2d, I can drag the line ends to wherever I want to drop. for an circle, I can drag to change the radius; for a rectangle, I can drag to change the width and height, etc.

    Particularly for Shape class, I'm so expecting to avoid writing everything from scratch by my own. I guess there must be some open staffs already. Can anybody give me some hints?

    Cheers
    Pei

    Welcome to Longer Vision
    https://www.longervision.com

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      The "shape class" would be a QPainterPath, but it is not a widget, widgets are rectangle in geometry, yo can still paint pretty much anything inside of a widget. QPainterPath can draw a wide range of curves, shapes, fills, strokes and so on...

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Code_ReaQtor
        wrote on last edited by
        #3

        [quote author="jiapei100" date="1362649607"]
        b) drag and click/select for some specific shapes:......... for an circle, I can drag to change the radius; for a rectangle, I can drag to change the width and height, etc.

        Particularly for Shape class, I'm so expecting to avoid writing everything from scratch by my own. I guess there must be some open staffs already. Can anybody give me some hints?
        [/quote]

        I also wanted similar thing months ago... though it wasn't really a direct solution, I was able to find an "inactive" implementation for resizing QGraphicsRectItem and QGraphicsEllipseItem without subclassing the item itself.

        You can find my fork that I "modified" at "sizegripitem":https://github.com/Code-ReaQtor/sizegripitem
        You can find the original implementation at "sizegripitem":https://github.com/cesarbs/sizegripitem

        Please visit my open-source projects at https://github.com/Code-ReaQtor.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved