Qlabel is invisible...why?

Sandy Meier smeier at kdevelop.org
Fri Mar 8 00:57:04 UTC 2002


Am Donnerstag, 7. März 2002 23:46 schrieben Sie:
> I've narrowed down the issue to this:
> Referring to function of learnprogramming.cpp:
> MyInfoWindow::MyInfoWindow() : QDialog(0,0,TRUE)
better use "MyInfoWindow::MyInfoWindow(QWidget* parent,const char* name) : 
QDialog(parent,name,TRUE)

> Is there more to changing QDIALOG to FALSE for making it Modeless?
No, normaly not.

> In this syntax reference:
> QDialog::QDialog ( QWidget * parent=0, const char * name=0, bool
> modal=FALSE, WFlags f=0 )
> I don't understand "QWidget * parent=0" and "const char * name=0"  What
> should be there?
> According to the book (0,0,TRUE) is fine but doesn't explain what the usage
> of 0,0 is for.

0 for the parent pointer means Toplevelwidget as far as I know, so it will be 
a child of the root desktop window.
0 for the name is just empty or not set.


> void MyMainWindowFSD::UpLinkz()
> {
> 	infoz = new MyInfoWindow();

I think you should try to make "infoz" a child of your Mainwindow (infoz = 
new MyInfoWindow(this);), but I think your code should work so far. 

If you or someone else can't fix this problem over the next 2 days, you could 
 send your program (incl. the makefiles) to my email-address . I will be back 
on sunday and will look over it. Interesting task. :-)

Ciao!
Sandy




More information about the KDevelop-devel mailing list