-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2514 from ales-erjavec/widget-status-bar-buttons
[ENH] Widget status bar buttons
- Loading branch information
Showing
9 changed files
with
164 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from AnyQt.QtCore import Qt | ||
from AnyQt.QtGui import QFocusEvent | ||
from AnyQt.QtWidgets import QStyle, QApplication | ||
from Orange.widgets.tests.base import GuiTest | ||
from Orange.widgets.utils import buttons | ||
|
||
|
||
class SimpleButtonTest(GuiTest): | ||
def test_button(self): | ||
# Run through various state change and drawing code for coverage | ||
b = buttons.SimpleButton() | ||
b.setIcon(b.style().standardIcon(QStyle.SP_ComputerIcon)) | ||
|
||
QApplication.sendEvent(b, QFocusEvent(QFocusEvent.FocusIn)) | ||
QApplication.sendEvent(b, QFocusEvent(QFocusEvent.FocusOut)) | ||
|
||
b.grab() | ||
b.setDown(True) | ||
b.grab() | ||
b.setCheckable(True) | ||
b.setChecked(True) | ||
b.grab() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters