binaural
5th September 2012, 22:25
Hi,
I have raspberry pi with 2 screens (first is composite from RPI second is usb to vga (displaylink)).
I have test app to display different text on both screens but if I run binary it always show text from
first widget on both screens. MainWindow and MainWindow_2 are just basic main widgets with qlabel
with different text.
I'm running my app with:
./test_dual -qws -display "multi: linuxfb:/dev/fb0 linuxfb:/dev/fb1" -nomouse
Num of screens: 2
Geometry: QRect(0,0 656x416)
Geometry: QRect(0,0 1680x1050)
Move to: 1680 : 0
I'm I missing something or it's just bug? I'm using Qt 4.8.2 compiled for ARM.
Thanks,
marek
code snippet:
#include <QtGui/QApplication>
#include "mainwindow.h"
#include "mainwindow_2.h"
#include <QDebug>
#include <QDesktopWidget>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
MainWindow_2 w2;
QDesktopWidget *widget = QApplication::desktop();
qDebug() << "Num of screens:" << widget->screenCount();
for (int i = 0; i < widget->screenCount(); i++) {
qDebug() << "Geometry:" << widget->screenGeometry(i);
}
QRect rect = widget->screenGeometry(1);
qDebug() << "Move to:" << rect.width() << ":" << rect.y();
w2.move(rect.width(), rect.y());
w.show();
w2.show();
return a.exec();
}
I have raspberry pi with 2 screens (first is composite from RPI second is usb to vga (displaylink)).
I have test app to display different text on both screens but if I run binary it always show text from
first widget on both screens. MainWindow and MainWindow_2 are just basic main widgets with qlabel
with different text.
I'm running my app with:
./test_dual -qws -display "multi: linuxfb:/dev/fb0 linuxfb:/dev/fb1" -nomouse
Num of screens: 2
Geometry: QRect(0,0 656x416)
Geometry: QRect(0,0 1680x1050)
Move to: 1680 : 0
I'm I missing something or it's just bug? I'm using Qt 4.8.2 compiled for ARM.
Thanks,
marek
code snippet:
#include <QtGui/QApplication>
#include "mainwindow.h"
#include "mainwindow_2.h"
#include <QDebug>
#include <QDesktopWidget>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
MainWindow_2 w2;
QDesktopWidget *widget = QApplication::desktop();
qDebug() << "Num of screens:" << widget->screenCount();
for (int i = 0; i < widget->screenCount(); i++) {
qDebug() << "Geometry:" << widget->screenGeometry(i);
}
QRect rect = widget->screenGeometry(1);
qDebug() << "Move to:" << rect.width() << ":" << rect.y();
w2.move(rect.width(), rect.y());
w.show();
w2.show();
return a.exec();
}