00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "PSQt/set_window.h"
00010 #include <QDesktopWidget>
00011 #include <QApplication>
00012 #include <iostream>
00013
00014 namespace PSQt {
00015
00016 void set_window(QWidget &widget, int x, int y)
00017 {
00018 QDesktopWidget *desktop = QApplication::desktop();
00019
00020 int WIDTH = 350;
00021 int HEIGHT = 280;
00022 int screenWidth = desktop->width();
00023 int screenHeight = desktop->height();
00024
00025 std::cout << "screen Width and Height:" << screenWidth << " " << screenHeight << std::endl;
00026
00027 widget.setGeometry(x, y, WIDTH, HEIGHT);
00028 }
00029
00030 }