Results 1 to 3 of 3

Thread: Hovering over qLineEdit issue

  1. #1
    Join Date
    Mar 2015
    Posts
    24
    Qt products
    Qt5
    Platforms
    Windows

    Default Hovering over qLineEdit issue

    I just wanted to make a complaint about an issue I'm having.
    I set a qLineEdit's stylesheet to make the background black but when I hover over it, it starts glitching and turns the background color white.
    The only solution I have is to setFrame(false);
    It's the same problem as this guy:
    https://forum.qt.io/topic/36399/styl...dows-8-0-8-1/5

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Hovering over qLineEdit issue

    Have you tried to set the stylesheet to include the hover selector?

    Just a guess, but have you tried something like:

    Qt Code:
    1. m_lineEdit1->setStyleSheet("QLineEdit {background-color:#888888;} QLineEdit:hover {background-color:#888888;}"); //gray
    To copy to clipboard, switch view to plain text mode 
    Might need a semicolon after the closing brace for the QLineEdit style. I didn't test this but seems like the hover selector probably comes into play and if its defaults are different than what you are setting for the QLineEdit, it may be the cause, etc.

    Hope that helps.

  3. #3
    Join Date
    Mar 2015
    Posts
    24
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Hovering over qLineEdit issue

    Problem persists for me, but setFrame is an alright temporary solution for my project.

Similar Threads

  1. Progress bar form QLineEdit issue
    By RafalNiewinski in forum Qt Programming
    Replies: 2
    Last Post: 2nd June 2013, 10:19
  2. Replies: 1
    Last Post: 26th March 2013, 11:35
  3. QTableView HOVERING ISSUE
    By kiran p in forum Qt Programming
    Replies: 2
    Last Post: 2nd June 2011, 07:45
  4. issue focusing QLineEdit rendered to QGraphicsScene
    By rndbit in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2011, 12:47
  5. Replies: 1
    Last Post: 12th October 2010, 22:20

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.