Results 1 to 5 of 5

Thread: How do I get elements of a base widget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do I get elements of a base widget?

    probably "hand-drawn" in its paintEvent()
    Diving deeper, I must confess I haven't reached the QGraphics chapter yet, is there anyway to explore Paint Elements? I assume paintEvents paint QGraphics Scene and Items, ya?

    So a standard QPushButton is constructed using the QGraphics family of classes and it's painted using a paintEvent? Is there a way to dive down into that and see what constructs the QPushButton?


    Thanks a lot, I really am learning a lot. 😁

    Cheers!

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How do I get elements of a base widget?

    So a standard QPushButton is constructed using the QGraphics family of classes and it's painted using a paintEvent?
    Yes, it is drawn using a paintEvent() (as are all QWidget-based classes), but no, as far as I know it is drawn using platform-specific QStyle ControlElement and SubElement types because it is not based on QGraphicsItem.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 9
    Last Post: 28th February 2015, 19:58
  2. data base in qt
    By Fafa in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2011, 00:52
  3. How to get the base parent Widget
    By vaibhav in forum Qt Programming
    Replies: 8
    Last Post: 15th February 2011, 11:27
  4. MVC - Abstract Widget Base Class - setupUI
    By SenSej in forum Newbie
    Replies: 0
    Last Post: 13th October 2008, 10:44
  5. very very base question
    By mickey in forum General Programming
    Replies: 12
    Last Post: 26th March 2008, 22:01

Tags for this Thread

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.