Results 1 to 3 of 3

Thread: Problem related to Out Side the Round Ring Button

  1. #1
    Join Date
    Oct 2011
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Problem related to Out Side the Round Ring Button

    Hi all,

    i want to develope the round ring button.
    i am able to create the round button with Push button and Style sheet.
    Code as follows:
    ---------------
    QPushButton *pushButton;
    pushButton = new QPushButton(this);
    pushButton->setObjectName(QString::fromUtf8("pushButton"));
    pushButton->setGeometry(QRect(40, 170, 90, 90));
    pushButton->setStyleSheet(QString::fromUtf8("border-radius: 45px ;\n"
    "border:7px solid gray;\n"
    "\n"""));

    -------------
    but, problem here, if i prees the out side of the ring shape button also ,it is takeing as button press.
    how to make mask the out side the ring shape. even user click the out of the ring it show not take it as click/press event.

    Can any one guide me on the same.

    Regards,
    sambu.

  2. #2
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Problem related to Out Side the Round Ring Button

    Try it
    Qt Code:
    1. pushButton->setStyleSheet("QPushButton { border-radius: 45px ;\n"
    2. "border:7px solid gray;} QPushButton:pressed { border-radius: 45px ;\n"
    3. "border:7px solid gray;} ");
    To copy to clipboard, switch view to plain text mode 
    May it help

  3. #3
    Join Date
    Oct 2011
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem related to Out Side the Round Ring Button

    Hi Niamita ,

    Thanks for replay.

    Below code which you send also, same behavior as my code. even if i click the out site the ring still it is consider as click behavior.
    It didn't work for me.

    Regards,
    sambu.

Similar Threads

  1. Manifest / Side by Side configuration.
    By hickscorp in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2010, 05:22
  2. Stack two QMenuBars instead of side by side?
    By killerwookie99 in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2008, 06:27
  3. Replies: 5
    Last Post: 15th February 2008, 02:54
  4. Replies: 6
    Last Post: 21st February 2007, 20:35
  5. Round Button
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2006, 11:32

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.