• 5291阅读
  • 2回复

请问QPushButton为什么在setMenu后,其isDown()和isChecked()都不好用了? [复制链接]

上一主题 下一主题
离线hemingway
 

只看楼主 倒序阅读 楼主  发表于: 2010-04-26
把菜单和按钮使用setMenu()关联后,好像按钮的isDown()和isChecked()都不好用了,有什么办法判断这个按钮的状态呢?
离线yangfanxing
只看该作者 1楼 发表于: 2010-04-26
  1. down : bool
  2. This property holds whether the button is pressed down.

  1. checked : bool
  2. This property holds whether the button is checked.

When setMenu(), button would popup the menu once it is set dowm or set check;
So, only if the menu shows, the state would change to "isDown" or "isChecked".
PHPWind好恶心。。。不想看这种界面。。。
离线hemingway

只看该作者 2楼 发表于: 2010-04-27
你的意思是当使用setMenu后,这个按钮就自动设定成setChecked(true)和setDown(true)了吗?
快速回复
限100 字节
 
上一个 下一个