Note that there are some explanatory texts on larger screens.

plurals
  1. POQt4 static compiling and odd errors with things happening before they should even exist
    primarykey
    data
    text
    <p>Always pick a title that draws in a programmer.</p> <p>Anyway I'm using linux and I compiled the qt4.7.1 libs using ./configure -static -nomake demos -nomake examples -nomake tools -prefix /local/qt/qtstatic</p> <p>the build and install all went fine, and I set it up in qt creator so I can build with it. Building any application works fine, however when I run the application it gives me an error.</p> <p>QWidget: Must construct a QApplication before a QPaintDevice Aborted</p> <p>I understand that this means a static object is trying to use a class (QPaintDevice) that needs QApplication to be called first, and since static objects are all processed before the actual application this is obviously going to fail, The first line after my main() is the QAplication, however I know that doesn’t make a difference, My .pro does contain CONFIGURE +=static, and I have defined static in the main program, Qt4 just doesn't like me.</p> <p>How can I fix it so the static objects don't all go insane like this.</p> <pre><code>#include &lt;QtGui/QApplication&gt; #include "microbrowse.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); microbrowse w; w.show(); return a.exec(); } </code></pre> <p>is the main, but that's probably not important, the main is pretty much the same for all QT apps made by qt creator, except microbrowse is the name of whatever widget your working on. The widget microbrowse is the entire program, all this does is create the QApplication, and dimension microbrowse. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload