Results 1 to 4 of 4

Thread: Default stylesheet of QGroupBox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    54
    Thanks
    3
    Thanked 10 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    2

    Default Default stylesheet of QGroupBox

    Hello,

    I have a QGroupBox with two QComboBoxes and three QPushButtons.

    If no selection is made in either one of the checkboxes I want the border of the groupbox to be red. So I used stylesheets.

    But not knowing the default stylesheet of the QGroupBox I can not get it the same size / margins / padding.

    Has anyone an idea how to get the correct stylesheet code?

    Qt Code:
    1. m_groupBox->setStyleSheet(QString::fromUtf8("QGroupBox { border: 1px solid red; border-radius: 5px; margin-top: 7px; margin-bottom: 7px; padding: 0px} QGroupBox::title {top:-7 ex;left: 10px; subcontrol-origin: border}"));
    To copy to clipboard, switch view to plain text mode 

    Regards,

    Marcel
    Attached Images Attached Images

Similar Threads

  1. Replies: 7
    Last Post: 12th January 2011, 22:01
  2. QGroupBox stylesheet
    By GuS in forum Qt Programming
    Replies: 2
    Last Post: 16th December 2010, 06:26
  3. Tab order ignored in QGroupBox
    By adskol in forum Newbie
    Replies: 2
    Last Post: 5th April 2010, 05:42
  4. QGroupBox
    By Devoraz in forum Newbie
    Replies: 1
    Last Post: 30th July 2009, 04:49
  5. QGroupBox
    By merry in forum Qt Programming
    Replies: 2
    Last Post: 22nd August 2007, 13:11

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.