c++ - Qt file gets reported as virus and won't launch -


i have made qt file , compiled it. straight after compiling, avast antivirus blocks virus. have spent hours trying find syntax error/infinite loop/typing mistake. have read other questions , googled problem. came conclusion out of understanding. here files:

top_secret.h

#ifndef top_secret_h #define top_secret_h  #include <qtgui>  class top_secret : public qmainwindow {     q_object     public:         top_secret();      private slots:         void password_ckeck();         void go_to_page_1();         void go_to_page_2();         void go_to_page_3();         void go_to_page_4();         void quit();         void lock();         void about();      private:         qstackedwidget *book;          qwidget *lock_window;         qwidget *window1;         qwidget *window2;         qwidget *window3;         qwidget *window4;          qlineedit *input;          qaction *quit_action;         qaction *lock_action;         qaction *about_action;          qmenu *filemenu; }; #endif 

submain.cpp

#include "top_secret.h"  top_secret::top_secret(){     //main things     quit_action = new qaction(tr("quit"), this);     about_action = new qaction(tr("about"), this);     lock_action = new qaction(tr("lock"), this);      connect(quit_action, signal(triggered()), this, slot(quit()));     connect(about_action, signal(triggered()), this, slot(about()));     connect(lock_action, signal(triggered()), this, slot(lock()));      filemenu = menubar() -> addmenu(tr("file"));     filemenu -> addaction(lock_action);     filemenu -> addaction(about_action);     filemenu -> addseparator();     filemenu -> addaction(quit_action);      book = new qstackedwidget;      //lock window     lock_window = new qwidget;      qlabel *label = new qlabel(tr("enter password"));     input = new qlineedit;     qpushbutton *button = new qpushbutton(tr("go"));      connect(button, signal(clicked()), this, slot(password_ckeck()));      qhboxlayout *lock_layout;     lock_layout -> addwidget(label);     lock_layout -> addwidget(input);     lock_layout -> addwidget(button);     lock_window -> setlayout(lock_layout);      //window 1     window1 = new qwidget;     qlabel *label1 = new qlabel("name: jakub jagielski<br>date of birth: 21/01/2014<br>gender: male<br>\     interested in: women<br>hair colour: brown<br>eye colour: brown");     qpushbutton *button1 = new qpushbutton(tr("next"));      connect(button1, signal(clicked()), this, slot(go_to_page_2()));      qvboxlayout *layout1;     layout1 -> addwidget(label1);     layout1 -> addwidget(button1);     window1 -> setlayout(layout1);      //window 2     window2 = new qwidget;     qlabel *label2 = new qlabel("interests: piano playing, science,<br>programming, computer science,<br>\ xbox 360 playing, reading facts,<br>logical puzzles, security programs,<br>bypassing self-made security \ programs,<br>creating complex security programs,<br>creating 2d games in python tkinter,<br>creating apps \ one.");     qpushbutton *button2previous = new qpushbutton("back");     qpushbutton *button2next = new qpushbutton("next");      connect(button2previous, signal(clicked()), this, slot(go_to_page_1()));     connect(button2next, signal(clicked()), this, slot(go_to_page_3()));      qhboxlayout *layout2bottom;     qvboxlayout *layout2;     layout2bottom -> addwidget(button2previous);     layout2bottom -> addwidget(button2next);     layout2 -> addwidget(label2);     layout2 -> addlayout(layout2bottom);     window2 -> setlayout(layout2);      //window 3     window3 = new qwidget;     qlabel *label3 = new qlabel("programming languages known user<br>rated out of 10:<br>\     python: 9/10<br>c++: 8/10<br>java: 5/10<br>html/css/javascript: 8/10<br>php: 2/10<br>batch: 5/10<br>");     qpushbutton *button3previous = new qpushbutton("back");     qpushbutton *button3next = new qpushbutton("next");      connect(button3previous, signal(clicked()), this, slot(go_to_page_2()));     connect(button3next, signal(clicked()), this, slot(go_to_page_4()));      qhboxlayout *layout3bottom;     qvboxlayout *layout3;     layout3bottom -> addwidget(button3previous);     layout3bottom -> addwidget(button3next);     layout3 -> addwidget(label3);     layout3 -> addlayout(layout3bottom);     window3 -> setlayout(layout3);      //window 4     window4 = new qwidget;     qlabel *label4 = new qlabel("this app has been created <br> try make app with<br>\     c++ , wonderful library called qt.<br>this person's account hasn't been<br>really hacked. in \     fact, person<br>has made app himself.");     qpushbutton *button4previous = new qpushbutton("back");     qpushbutton *button4end = new qpushbutton("quit");      connect(button4previous, signal(clicked()), this, slot(go_to_page_3()));     connect(button4end, signal(clicked()), this, slot(quit()));      qhboxlayout *layout4bottom;     qvboxlayout *layout4;     layout4bottom -> addwidget(button4previous);     layout4bottom -> addwidget(button4end);     layout4 -> addwidget(label4);     layout4 -> addlayout(layout4bottom);     window4 -> setlayout(layout4);      //main     book -> addwidget(lock_window);     book -> addwidget(window1);     book -> addwidget(window2);     book -> addwidget(window3);     book -> addwidget(window4);      setcentralwidget(book); }  void top_secret::password_ckeck(){     qstring attempt = input -> text();     if (attempt == "jakub"){         top_secret::book -> setcurrentindex(1);     } }  void top_secret::go_to_page_1(){     top_secret::book -> setcurrentindex(1); }  void top_secret::go_to_page_2(){     top_secret::book -> setcurrentindex(2); }  void top_secret::go_to_page_3(){     top_secret::book -> setcurrentindex(3); }  void top_secret::go_to_page_4(){     top_secret::book -> setcurrentindex(4); }  void top_secret::lock(){     top_secret::book -> setcurrentindex(0); }  void top_secret::quit(){     qmessagebox messagebox;     messagebox.settext("do wish quit?");     messagebox.setwindowtitle("exit?");     messagebox.setstandardbuttons(qmessagebox::yes | qmessagebox::no);     if (messagebox.exec() == qmessagebox::yes){         close();     } }  void top_secret::about(){     qmessagebox messagebox2;     messagebox2.settext("this app test try out new c++ abilities. app \     take me half time took me if wrote in python.");     messagebox2.setwindowtitle("about");     messagebox2.exec(); } 

main.cpp

#include "top_secret.h" #include <qapplication>  int main(int argc, char *argv[]){     qapplication app(argc, argv);     top_secret *program = new top_secret;     program -> show();     return app.exec(); } 

i'm sorry amount of code present , don't expect perfect answer if understand did wrong, pleased. also, when add the file ignored antivirus, doesn't launch.

note other qt programs work fine i'm convinced due code.

i had same problem avast. wasn't qt specific thing. avast blocked programmed.

you have go settings , uncheck box says "unknown source". avast doesn't know program comes , blocks because may virus. @ least that's avast did programs. after unchecked checkbox worked fine.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -