Results 1 to 2 of 2

Thread: how to create circular dialog

  1. #1
    Join Date
    Sep 2009
    Posts
    54
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default how to create circular dialog

    Dear Friends,
    Is it possible to create circular dialog in Qt, if so, how can i create it

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to create circular dialog

    Place this code in the constructor of the your dialog.

    Qt Code:
    1. int side = qMin(width(), height());
    2. QRegion maskedRegion(width() / 2 - side / 2, height() / 2 - side / 2, side,
    3. side, QRegion::Ellipse);
    4. setMask(maskedRegion);
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to qlands for this useful post:

    Askar (25th April 2012)

Similar Threads

  1. Replies: 1
    Last Post: 7th June 2011, 18:22
  2. program exit itself when create dialog with QSystemTrayIcon
    By jim2212001 in forum Qt Programming
    Replies: 2
    Last Post: 27th August 2010, 12:35
  3. Create a numeric keypad Dialog
    By gt.beta2 in forum Newbie
    Replies: 11
    Last Post: 27th January 2009, 17:40
  4. How to create a save as dialog box?
    By gurinder in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2008, 14:01
  5. how to create a popup dialog
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 19th November 2006, 17:40

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.