Unsolved PhonOn displays at the only one monitor in a dual monitor system.
-
Environment =>
OS : MS Windows 7
Qt : 4.6.2 (32bits)
Monitor 1 : 1600 x 900
Monitor 2 : 1920 x 1080
PhonOn Display Size : 2000 x 700
PhonOn Origin : 100 x 100Code =>
QDesktopWidget *desktopWidget = new QDesktopWidget();
mediaObject = new Phonon::MediaObject(desktopWidget);
videoWidget = new Phonon::VideoWidget(desktopWidget);Result =>
Video is displayed only in the Monitor 1. -
Hi and welcome to devnet,
From your code, you're not telling your VideoWidgets to go on the secondary monitor, so they should stay on the default monitor.
-
This post is deleted! -
@SGaist
I want to display from monitor1 to monitor2. Video is displayed in the monitor1 but black is displayed in the monitor2. -
@SGaist I want to display monitor1 and monitor2 at the same time because displayed video resolution is larger than the resolution of the monitor1.
-
What you are doing is just setting your desktopWidget as parent of videoWidget. You're not moving it to your secondary screen. Also note that the correct way to have a QDesktopWidget instance is to get it from QApplication.
-
@SGaist Thank you for your answer, but I can't understand "moving it to your secondary screen".
If you don't mind, can you give me a sample code? -
You have two monitors, so if you want your widget to appear on your second monitor, you have to move it there. i.e. set its position to be in your secondary screen QDesktopWidget. You can get that using QDesktopWidget::screenGeometry
QDesktopWidget *desktopWidget = qApp->desktop(); QRect secondScreenGeometry = desktopWidget->screenGeometry(1); myWidget->move(secondScreenGeometry.center());
-
@SGaist I think there is misunderstanding. I want to display video that displaying area is 2000x700. So the video is displayed in the monitor1(1600x900) and monitor2(1920x1080), not monitor1 or monitor2. My problem is the area of monitor1 displays video well but the area of monitor2 only display black screen.
-
Ok, indeed, there was a misunderstanding. So if you move your widget to your second monitor, it gets black or just the part when the widget is first shown ?
-
@SGaist Displayed video size(area) is 2000x700. So I should use from (100,100) of monitor1 to (500,800) of monitor2. In other words monitor1 display 1500x700 of video and monitor2 display 500x700 of video at the same time. But monitor1 displays well but monitor2 displays black. So some area(monitor2) of video is shown black.
-
What happens if you have the complete video widget on the secondary screen ?
-
@SGaist Then PhonOn displays the vidoe well.
-
Are both your screen "standard" ? Meaning not one being retina
-
@SGaist Yes, my screens are standard.
-
I just realized, Qt 4.6.2 ? You should at least go to 4.8.7
-
@SGaist Thank you for your help. Do you mean the PhonOn of 4.6.2 doesn't work but 4.8.7 works well in this case?
-
No, I mean that Qt 4.6.2 is pretty outdated so you should at least use the latest version available of the Qt 4 series (note that 4.8.7 is the last version of the Qt 4 series).
-
@SGaist Not working for me (Qt 5.13).
-
@Sprezzatura said in PhonOn displays at the only one monitor in a dual monitor system.:
@SGaist Not working for me (Qt 5.13).
Well, with that much details, it's going to be a bit hard to help.