PDA

View Full Version : How to get multi-screen count?? (for static libs)



mitsune
15th January 2013, 03:06
Platform :
1-LCD: 1024 × 600
2-LCD: 1024 × 768
Qt Creator 2.5.2 Based on Qt 4.8.2 (32bit)
OS: ubuntu 12.10

If I use the Qt default dynamic linked (compiler) call
QApplication :: desktop () -> screenCount (); Ans: 2
QApplication :: desktop () -> isVirtualDesktop () Ans: true
QApplication :: desktop () -> screenGeometry (0) Ans: x = 0 y = 0 width = 1024 height = 600
QApplication :: desktop () -> screenGeometry (1) Ans: x = 1024 y = 0 width = 1024 height = 768

Qt statically linked (compiler) call
QApplication :: desktop () -> screenCount (); Ans: 1
QApplication :: desktop () -> isVirtualDesktop () Ans: false
QApplication :: desktop () -> screenGeometry (0) Ans: x = 0 y = 0 width = 2048 height = 768
QApplication :: desktop () -> screenGeometry (1) Ans: x = 0 y = 0 width = 2048 height = 768

Why statically linked(compiler) information is wrong??
I hope to get the results of the dynamic linked.
I build a statically linked less what information (packages).
I refer to the following message, but no effect
http://qt-project.org/doc/qt-4.8/install-x11.html

Does anyone know statically linked wrong?

Following instruction for the building of static links
. / configure-release-developer-build-static-platform linux-g + + -32-x11-qt-zlib-qt-libpng-qt-libmng-qt-libjpeg-qt-libtiff-prefix / usr / local / Trolltech / Qt -4.8.2_static

wysota
15th January 2013, 08:51
You probably forgot to pass some magic switch to configure like -xinerama or something similar.

anda_skoa
15th January 2013, 16:16
Or the dynamic build loads a QPA plugin and the static one included a different one.

Statically linking Qt is usually a bad idea due to the loss of plugin support.

Cheers,
_