-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Actual value was -2.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------Screenshot
Environment data
PS Version: $($PSVersionTable.PSVersion)
PS HostName: $hostName
PSReadLine Version: $v
PSReadLine EditMode: $((Get-PSReadLineOption).EditMode)
OS: $os
BufferWidth: $([console]::BufferWidth)
BufferHeight: $([console]::BufferHeight)Steps to reproduce
from PySide6.QtWidgets import (QMainWindow, QPushButton, QVBoxLayout, QWidget, QApplication, QLabel)
from PySide6.QtMultimedia import QMediaPlayer, QAudioOutput
from PySide6.QtMultimediaWidgets import QVideoWidget
from PySide6.QtCore import QUrl, Qt
import sys
class kalokohanwindow(QMainWindow):
def init(self):
super().init()
self.setWindowTitle("kalokohan")
self.resize(600,400)
layout = QVBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
self.miss_mo_label = QLabel("miss mo??")
self.miss_mo_label.setStyleSheet("font-size: 70; padding: 0px; color: white;; margijn: opx;")
self.miss_mo_label.setAlignment(Qt.AlignCenter)
layout.addWidget(self.miss_mo_label)
self.oo_button = QPushButton("OO")
self.oo_button.setStyleSheet("""
QPushButton {
background-color: white;
color: blask;
font-size: 30px:
padding: 40px;
border: none;
}
QPushButton:hover {
background_color:: darkred;
}
""")
layout.addWidget(self.oo_button)
self.oo_button.clicked.connect(self.play_video)
central_widget = QWidget()
central_widget.setLayout(layout)
self.setStyleSheet("""
QMainWindow {
background-image: url('ha.jpg')
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
QPushButton {
background-image: none;
}
""")
self.setCentralWidget(central_widget)
def play_video(self):
self.video_widget = QVideoWidget()
self.player = QMediaPlayer()
self.audio_output = QAudioOutput()
self.player.setAudioOutput(self.audio_output)
video_path = QUrl.fromLocalFile("ako.mp4")
self.player.setSource(video_path)
self.player.setVideoOutput(self.video_widget)
self.video_window = QMainWindow(self)
self.video_window.setWindowTitle("Miss ka baa?")
self.video_window.setCentralWidget(self.video_widget)
self.video_window.resize(700, 400)
self.video_window.show()
self.player.play()
if name == "main":
app = QApplication(sys.argv)
window = kalokohanwindow()
window.show()
sys.exit(app.exec())
Expected behavior
n/a
Actual behavior
Metadata
Metadata
Assignees
Labels
No labels

