Results 1 to 9 of 9

Thread: How to get Rect or Size by QStyle?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    21
    Thanked 3 Times in 3 Posts

    Smile How to get Rect or Size by QStyle?

    Hi, all.
    I subclass QTableView and reimplement
    Qt Code:
    1. QTableView::mouseReleaseEvent(QEvent *event)
    To copy to clipboard, switch view to plain text mode 
    , in which i get
    Qt Code:
    1. QTableView::currentIndex()
    To copy to clipboard, switch view to plain text mode 
    and the event pos by
    Qt Code:
    1. event->pos()
    To copy to clipboard, switch view to plain text mode 
    before this i've set some items checkable so there is a checkbox in the responding positions.
    Now, i'm wondering how can i get the checkbox's geometry, rect or size? which is devided from the item's other part. as in the attachment, i want to know the red rectangle's rect or just size.

    By now i can get the whole item's rect through it's index and the style of this view. by the way, the view's indicator's appearence is set by a stylesheet.

    thank you.
    Attached Images Attached Images

Similar Threads

  1. QT-wince and QHttp::readAll() trouble....
    By AcerExtensa in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 12th June 2008, 09:40
  2. adjust Font size to a given rect when drawText
    By yartov in forum Qt Programming
    Replies: 5
    Last Post: 14th May 2008, 19:03
  3. QLabel size policy
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 7th December 2007, 17:57
  4. Replies: 1
    Last Post: 24th October 2006, 16:40
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

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.