Results 1 to 3 of 3

Thread: How to create custom styled widgets ???

  1. #1
    Join Date
    Jul 2007
    Posts
    104
    Thanks
    22
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to create custom styled widgets ???

    Well while looking into google maps I realize that :

    - On map there are focus in out or move/turn buttons or widgets ... they may be transparent or visible/invisible according to mouse move ...
    also their shapes are custom - not bordered etc....now I want to add these type controls on my mdiarea ...

    where should i start from ?
    any ideas ?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to create custom styled widgets ???

    Use a normal QWidget, do all the painting yourself, set an transparent background etc. (also you could have a look at QWidget::setMask()). Further use the mouse event handlers to detect clicks and hovers. Do the painting according to these states.

    And what is in your mdiarea you would like to provide such a functionality? If it is a QGraphicsView then you can do the control easier with customized QGraphicsItem.

  3. #3
    Join Date
    Jul 2007
    Posts
    104
    Thanks
    22
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to create custom styled widgets ???

    There is qglwidget mdisubwindows in mdiarea...i wished to focus on/out or turn left/right type operations implemented some cool widget like theses...

    now i will look for these things you told me...

    thanks , i wll try them..

Similar Threads

  1. Replies: 1
    Last Post: 18th July 2012, 09:59
  2. Replies: 0
    Last Post: 15th May 2009, 15:38
  3. How to create Custom Slot upon widgets
    By ashukla in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2007, 14:07
  4. How create Qt custom widgets using vc++ editor
    By joseph in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2007, 10:53
  5. create custom widgets
    By nimmyj in forum General Discussion
    Replies: 1
    Last Post: 20th November 2006, 08:24

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.