Qlabel is invisible...why?

Sandy Meier smeier at kdevelop.org
Thu Mar 7 15:10:05 UTC 2002


Am Donnerstag, 7. März 2002 02:56 schrieben Sie:
> Here is the problem:
> I made a "Top Level?" modal widget window popup during playback so that it
> can say "Playing..." (and maybe add the filename too later).
> But with this widget pops up the QLabel text is not there.

Please use QMainWindow for your mainwindow and QDialog for your dialog. Using 
QWidget isn't the best solution.

> #include "learnprogramming.h"
>  #include <qlabel.h>
>
>
>  int FileCounter=-1;
>  int i;

What is this? Global variables? :-) Just one tip: Use (static) class 
variables for this, or at least namespaces if you want to write big software 
in the future. :-) 

>  void MyMainWindowFSD::UpLinkz()
>  {
>
> TheDialog= new QWidget;
If you don't use "this" as a parameter you will get memory leaks later. If 
you don't want to use "this"  please put a "delete" somewhere in your code.

Sandy




More information about the KDevelop-devel mailing list