Results 1 to 5 of 5

Thread: How to draw rectangle with moveable edge

  1. #1
    Join Date
    Jul 2010
    Posts
    33
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How to draw rectangle with moveable edge

    Hi,

    I want to create an application that have one main rectangle and it consist more than one rectangle inside the main rectangle with moveable edge and also want to shift one inner rectangle up and down inside the main rectangle. Just like the DiskUtily but diskutily does not have the shift facility.


    Thanks & Regards

    Sagir Ahmed
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to draw rectangle with moveable edge

    I guess what you need is QListWidget. The items can be moved within the list, you will only need to set some property.

    Have a look at QListWidgetand QListWidgetItem

  3. #3
    Join Date
    Jul 2010
    Posts
    33
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: How to draw rectangle with moveable edge

    I want to draw rectangles with moveable edge, I think it is used for item . Any other class can be used like QSplitter or QDockWidget. I want to know that can we move widget in QSplitter . I can able to resize the widget in Qsplitter but not able to shift or move up and down

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: How to draw rectangle with moveable edge

    Use QGraphicsView

  5. #5
    Join Date
    Jul 2010
    Posts
    33
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: How to draw rectangle with moveable edge

    I have draw rectangles using paintEvent but not able to move the edge and also not able to shift up and down.

Similar Threads

  1. Replies: 10
    Last Post: 25th June 2009, 02:09
  2. How to draw fast rectangle/triangle/circle
    By nileshsince1980 in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2008, 11:40
  3. Replies: 2
    Last Post: 5th July 2008, 19:35
  4. how to draw columns in QPainter's rectangle
    By jyoti in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2007, 10:50
  5. Draw a rectangle alternating two colors with qPainter
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 24th January 2006, 23:12

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.