Results 1 to 5 of 5

Thread: Changing only Border color of QFRAME and not color text

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    51
    Thanks
    2
    Qt products
    Qt4

    Default Changing only Border color of QFRAME and not color text

    Good morning,
    simple problem I need a widget surrounded by a rectancgle, so i
    create a widget with a Frame.

    i've a QFRAME (box and Plain)
    and i want simply change the border color and not the background color and the text color

    i try to

    frame->setStyleSheet("color:blue");

    the background remains the default colour but in this way i've the border blu and the text blue !

    is there a way to have only border in different color ?

    i try
    frame->setStyleSheet("border: 5px solid black");

    but in this way also my QPushButton and TextBox are sourrounded by the big border

    I need a simple rectangle as widget border !

    Thanks Gabriele

    Thanks Gabriele
    Last edited by gab74; 7th September 2011 at 16:23. Reason: updated contents

Similar Threads

  1. Using a QFrame as a color selection indicator
    By KShots in forum Qt Tools
    Replies: 8
    Last Post: 14th June 2011, 23:55
  2. Replies: 3
    Last Post: 22nd January 2010, 16:46
  3. Dynamically changing QFrame color
    By Doug Broadwell in forum Newbie
    Replies: 6
    Last Post: 16th October 2008, 08:22
  4. How to set the BORDER COLOR of QDialog?
    By ashukla in forum Qt Programming
    Replies: 6
    Last Post: 13th November 2007, 16:09
  5. Changing the text color of a QTreeView leaf.
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 22nd March 2006, 23:58

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.