Frage

I have an application that is suppose to run in full screen and not allow the user to minimize or exit with the use of the minimize and exit buttons that usually appear on the corner of the window. Essentially the title bar or whatever it is called is not visible.

I'm trying to make a test where squish checks whether the exit/minimize buttons can be pressed or is visible. Is there a way to do this?

When I try to use Spy or record function all I get is the window commands for minimize/exit a window but no clickbutton or a way to verify the visibility of the buttons.

Thanks!

War es hilfreich?

Lösung

I asked squish tech support and they recommended using the qt window flags such as:

def logWindowFlags(flags):
  test.log("Qt::WindowMinimizeButtonHint = %s" % flags.testFlag(Qt.WindowMinimizeButtonHint))
  test.log("Qt::WindowMaximizeButtonHint = %s" % flags.testFlag(Qt.WindowMaximizeButtonHint))
  test.log("Qt::WindowCloseButtonHint = %s" % flags.testFlag(Qt.WindowCloseButtonHint))
  test.log("Qt::WindowOkButtonHint = %s" % flags.testFlag(Qt.WindowOkButtonHint))
def main:
  logWindowFlags(widgetObject.windowFlags())
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top