View Full Version : Screen Resolution Restrictions

16th November 2011, 02:56

I have a question about the maximum screen resultions supported by Qt. I'm porting an application from X/Motif, and X coordinates are short's with dimensions of unsigned shorts, so the maximum X/Y coordinate in a window is 32,767. We've used Exceed on Windows, so the same restrictions have applied to both Linux and Windows.

In our industry, our customers sometimes use wallboard systems consisting of many monitors comprising a very large virtual display. We're unlikely to have a resolution restriction vertically, but 16 monitors at 2000+ pixels per monitor can exceed the 32,767 restriction horizontally.

Our Qt-based application will also run on both platforms. On Linux, since Qt runs on top of X, I presume that the same resolution restriction is in effect. Is that correct? On Windows, what is the maximum supported resolution?


16th November 2011, 04:27
The Xlib drawing primitives I can see all take int arguments for x, y positions, e.g

int XDrawLine(Display *display, Drawable d, GC gc, int x1, int y1, int x2, int y2);
int XMoveResizeWindow(Display *display, Window w, int x, int y, unsigned width, unsigned height);

and Qt takes ints for these sorts of values too:

const QRect QDesktopWidget::availableGeometry ( int screen = -1 ) const // QRect is defined with ints
void QWidget::move ( int x, int y )

Int is 32-bits on any modern machine, but since Exceed has been around a very long time it is possible they are hamstrung by a 16-bit int.

16th November 2011, 20:40
Thanks for catching that. My confusion appears to stem from Motif, where the Position and Dimension typedefs are a short and unsigned short respectively. I must've assumed that those restrictions existed at the X level and never caught the difference.

A guess the question really comes down to what Qt has been tested with. I doubt I'm the first person in the world to sprawl a QGraphicsView across 40 feet of monitors, but it would be comforting to know for sure.