osx - QListWidget on mac os X show abnormal -


i use qlistwidget on qt creator of mac, code

m_plistwidget->setobjectname(qstringliteral("ttmanagevmlist")); m_plistwidget->setframeshape(qlistwidget::noframe); m_plistwidget->setattribute(qt::wa_translucentbackground,false); m_plistwidget->setalternatingrowcolors(true); m_plistwidget->setcontentsmargins(0,0,0,0); m_plistwidget->setresizemode(qlistview::fixed); m_plistwidget->setautoscroll(true); m_plistwidget->setedittriggers(qabstractitemview::noedittriggers); 

but shows abnormal,like

enter image description here

it has blue border,but when loses focus,it's normal. knows reason of problem?

i believe can use this:

m_plistwidget->setattribute(qt::wa_macshowfocusrect, false); 

read qt::wa_macshowfocusrect here

indicates widget should qfocusframe around it. widgets draw own focus halo regardless of attribute. not qwidget::focuspolicy plays main role in whether given focus or not, controls whether or not gets focus frame. attribute applicable os x.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -