`qt:find` finds QObjects, not QWidgets
This commit is contained in:
parent
a3b9f5c072
commit
6a87e2863f
2
main.cpp
2
main.cpp
|
@ -115,7 +115,7 @@ void qt_hide(QWidget *w) { w->show(); }
|
||||||
void qt_deleteobject(QObject *o) { delete o; }
|
void qt_deleteobject(QObject *o) { delete o; }
|
||||||
void qt_deletepixmap(QPixmap *o) { delete o; }
|
void qt_deletepixmap(QPixmap *o) { delete o; }
|
||||||
___bool qt_connect(QWidget *w1, char *sig, QObject *w2, char *slot) { return bool(QObject::connect(w1, sig, w2, slot)); }
|
___bool qt_connect(QWidget *w1, char *sig, QObject *w2, char *slot) { return bool(QObject::connect(w1, sig, w2, slot)); }
|
||||||
QWidget *qt_find(QWidget *parent, char *name) { return parent->findChild<QWidget *>(QString(name)); }
|
QObject *qt_find(QObject *parent, char *name) { return parent->findChild<QObject *>(QString(name)); }
|
||||||
QObject *qt_receiver(char *name, C_word proc) { return new SimpleReceiver(name, proc); }
|
QObject *qt_receiver(char *name, C_word proc) { return new SimpleReceiver(name, proc); }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ void qt_deleteobject(qtobject widget);
|
||||||
void qt_deletepixmap(qtpixmap widget);
|
void qt_deletepixmap(qtpixmap widget);
|
||||||
qtpixmap qt_pixmap(char *filename);
|
qtpixmap qt_pixmap(char *filename);
|
||||||
___bool qt_connect(qtwidget w1, char *sig, qtobject w2, char *slot);
|
___bool qt_connect(qtwidget w1, char *sig, qtobject w2, char *slot);
|
||||||
qtwidget qt_find(qtwidget parent, char *name);
|
qtobject qt_find(qtobject parent, char *name);
|
||||||
qtobject qt_receiver(char *name, C_word proc);
|
qtobject qt_receiver(char *name, C_word proc);
|
||||||
int qt_message(char *caption, char *text, qtwidget parent, char *b0, char *b1, char *b2);
|
int qt_message(char *caption, char *text, qtwidget parent, char *b0, char *b1, char *b2);
|
||||||
const char *qt_classname(qtobject w);
|
const char *qt_classname(qtobject w);
|
||||||
|
|
Ŝarĝante…
Reference in New Issue