#include <QApplication>
#include <QFrame>
#include <QDialog>
#include <QTabBar>
#include <QComboBox>
#include <QLabel>
#include <QtGui>
#include <Q3ListBox>
#include <QStyle>
#include <Qt3Support>
#include <QTabBar>
#include <QImage>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/extensions/shape.h>
#include <X11/Xatom.h>
#include <qx11info_x11.h>
{
Q_OBJECT
public:
~MyWidget() {delete btn;}
{
printf("Geometry is (%i, %i, %i, %i) %X\n", g.x(), g.y(), g.width(), g.height(), this);
}
protected:
{
}
};
int main(int argc, char *argv[])
{;
MyWidget *W0 = new MyWidget(0, Qt::Window);
W0->winId();
W0->setGeometry(100, 200, 100, 200);
W0->show();
printf("%i, %i, %i, %i W0 = %X\n", W0->geometry().x(), W0->geometry().y(), W0->geometry().width(), W0->geometry().height(), W0);
return QApp.exec();
}
#include "main.moc"
#include <QApplication>
#include <QFrame>
#include <QDialog>
#include <QTabBar>
#include <QComboBox>
#include <QLabel>
#include <QtGui>
#include <Q3ListBox>
#include <QStyle>
#include <Qt3Support>
#include <QTabBar>
#include <QImage>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/extensions/shape.h>
#include <X11/Xatom.h>
#include <qx11info_x11.h>
class MyWidget : public QWidget
{
Q_OBJECT
public:
QFrame *m_frame;
QPushButton *btn;
MyWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) {};
~MyWidget() {delete btn;}
void moveEvent (QMoveEvent *e)
{
QRect g = geometry();
printf("Geometry is (%i, %i, %i, %i) %X\n", g.x(), g.y(), g.width(), g.height(), this);
}
protected:
void paintEvent(QPaintEvent *e)
{
QWidget::paintEvent(e);
}
};
int main(int argc, char *argv[])
{;
QApplication QApp(argc, argv);
MyWidget *W0 = new MyWidget(0, Qt::Window);
W0->winId();
W0->setGeometry(100, 200, 100, 200);
W0->show();
printf("%i, %i, %i, %i W0 = %X\n", W0->geometry().x(), W0->geometry().y(), W0->geometry().width(), W0->geometry().height(), W0);
return QApp.exec();
}
#include "main.moc"
To copy to clipboard, switch view to plain text mode
Bookmarks