At the moment we are dealing with quite a nasty bug, causing QT widgets to be broken (dropdown for example: the dropdown is on screen 3, but opens on screen 1..), popups to be opened at the wrong position, screencount to be incorrect, screensize to return (0, 0) instead of (1920,1200).
The setup:
- Simatic Rack PC (IPC847D) with 3 monitors ([strike]iiyama[/strike] Edit: EIZO screens), each at a resolution of 1920*1200. Screens ordered from LEFT(1) to CENTER (2) to RIGHT (3) in windows.
- OS: Windows Server 2012 R2 standard
- WinCC OA 3.14 P002
- Running project with 1 basepanel, containing a dropdown-widget and a button that triggers a popup using ChildPanelOnCentral
The bug is easy to reproduce:
- The basepanel is positioned on a random screen. Popups open up nicely on the center of the basepanel, the dropdown widget works fine
- A random screen is turned off, this may be the screen at which the popup is visible or another screen.
- The bug has now been triggered. The screen may be turned on again, but this doesnt influence anything.
This results in the following:
- Popups are only opened on screen 1 regardless of the position of the basepanel. Note: if the basepanel is on screen 1, all seems fine. If the basepanel is on screen 2 or 3, the popup opens on the RIGHT HAND SIDE of screen 1 (so the X-position is wrong), but it does take the correct Y-position.
- The Dropdown opens on screen 1. If the basepanel is on screen 1, all seems fine. If the basepanel is on screen 2 or 3, the same behaviour as the popup occurs
- getScreenCount() always returns 1 (even though more screens are connected)
- getScreenSize() always returns 0, 0 with an offset of 0, 0 from screen 1.
On top of this: the function panelPosition() always returns the CORRECT x/y position.
The bug was discovered due to the QT widget opening its dropdown on the wrong screen. To get more details, I had written the following snippet of code which runs as a thread in the basepanel:
Code: Select all
void showPosition()
{
while( 1 )
{
// Count the number of screens
int iScreenCount = getScreenCount();
string strScreenCount = "Number of screens: " + iScreenCount;
// Now create an information string, containing
// details about each screen
string strScreenInformation;
for( int i = 1; i