Results 1 to 4 of 4

Thread: Empty style sheet changes QLineEdit

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Empty style sheet changes QLineEdit

    Hi,

    I can't seem to understand this. If I pass an empty stylesheet to a QLineEdit, the edit field changes property.

    * Try to enter a 'g' in the example included below. The lower part of the 'g' will be invisible.
    * Remove the call to setStyleSheet(). The lower part of the 'g' becomes visible.

    Qt 4.5.1, Ubuntu 8.04

    Best regards,

    Mads

    Qt Code:
    1. #include <QtGui>
    2.  
    3. #include "lineedit.h"
    4.  
    5. LineEdit::LineEdit(QWidget *parent)
    6. : QLineEdit(parent)
    7. {
    8. QString style_sheet("QLineEdit {}");
    9. setStyleSheet(style_sheet);
    10. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 15th June 2009 at 21:23. Reason: missing [code] tags

Similar Threads

  1. Replies: 5
    Last Post: 8th June 2009, 22:16
  2. QMenu style sheet: works in dev env, breaks in release
    By JimDaniel in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2008, 19:18
  3. Pointer Question related to QLineEdit
    By ChrisReath in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 15:13
  4. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 08:38
  5. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 15:22

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.