Results 1 to 5 of 5

Thread: Win CE eapplication created with Qt 4.7.1 crashes

  1. #1
    Join Date
    Feb 2010
    Posts
    99
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    31
    Thanked 3 Times in 3 Posts

    Default Win CE eapplication created with Qt 4.7.1 crashes

    Hi,
    I am trying to create Qt application for win ce 6 professional. I downloaded qt_everywhere_opensource and compiled it for wince 6 using the steps described here. The compilation was successful.

    Here is my complete setup
    Windows 7 64 bit machine
    Visual Studio 2005
    Qt_VS addin 1.1.7
    Qt 4.7.1

    I am able to run the sample applications that came with Windows Mobile 6 SDK using VS 2005. And it brings up the emulator and runs the application.

    Now I create a Qt application using Qt Creator (directly creating Qt application in VS fails). the application has a button and a text box. When you press button text is displayed in textbox.
    I create vsproj file using qmake and open the application in vs2005. It compiles fine but when I try to run it brings up the emulator but gives error shown in attached image.

    VS-wince-qt error.png

    Can any one tell me what is the issue here? Will I have to install VS again or do I need another version of VS?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Win CE eapplication created with Qt 4.7.1 crashes

    Can any one tell me what is the issue here?
    Most probably the "issue" is a bug in your code.

    Post your code so that we can have a look.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Feb 2010
    Posts
    99
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    31
    Thanked 3 Times in 3 Posts

    Default Re: Win CE eapplication created with Qt 4.7.1 crashes

    Here is the code

    MainWindow.h
    Qt Code:
    1. #ifndef MAINWINDOW_H
    2. #define MAINWINDOW_H
    3.  
    4. #include <QMainWindow>
    5.  
    6. namespace Ui {
    7. class MainWindow;
    8. }
    9.  
    10. class MainWindow : public QMainWindow {
    11. Q_OBJECT
    12. public:
    13. MainWindow(QWidget *parent = 0);
    14. ~MainWindow();
    15.  
    16. protected:
    17. void changeEvent(QEvent *e);
    18. public slots:
    19. void on_btn1_clicked();
    20.  
    21. private:
    22. Ui::MainWindow *ui;
    23. };
    To copy to clipboard, switch view to plain text mode 
    MainWindow.cpp
    Qt Code:
    1. #include "MainWindow.h"
    2. #include "ui_MainWindow.h"
    3.  
    4. MainWindow::MainWindow(QWidget *parent) :
    5. QMainWindow(parent),
    6. ui(new Ui::MainWindow)
    7. {
    8. ui->setupUi(this);
    9. }
    10.  
    11. MainWindow::~MainWindow()
    12. {
    13. delete ui;
    14. }
    15.  
    16. void MainWindow::on_btn1_clicked()
    17. {
    18. ui->txt1->setText("Hello World");
    19. }
    20.  
    21. void MainWindow::changeEvent(QEvent *e)
    22. {
    23. QMainWindow::changeEvent(e);
    24. switch (e->type()) {
    25. case QEvent::LanguageChange:
    26. ui->retranslateUi(this);
    27. break;
    28. default:
    29. break;
    30. }
    31. }
    To copy to clipboard, switch view to plain text mode 

    I haven't changed main.cpp .

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Win CE eapplication created with Qt 4.7.1 crashes

    I see no problem in your code.
    The error you are getting however, sounds like it might be related to 64bit problem.
    Have a look in your project settings, and make sure you are compiling and linking against the WinCE Qt.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Feb 2010
    Posts
    99
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    31
    Thanked 3 Times in 3 Posts

    Default Re: Win CE eapplication created with Qt 4.7.1 crashes

    Thanks high_flyer.

    I am also thinking that the issue is with setup. I mean VS2005 with Win 7 64 bit. I tried on another machine with Win XP 32 bit with VS2005 and it works fine. I can bring up the application in emulator and when I press button I see the message in text box. But on device when I press button text box is not updated.
    The issue now is when I press button nothing happens ("Hello world" should be printed in text box).
    The code is same as I posted above.

    Let me know if you have any idea about this.
    thanks

Similar Threads

  1. Database not being created
    By Splatify in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2011, 00:31
  2. Check has created with new
    By wirasto in forum Qt Programming
    Replies: 5
    Last Post: 16th March 2010, 16:02
  3. GUI created from Database
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2009, 00:43
  4. MSVC no .lib created
    By magland in forum Qt Programming
    Replies: 3
    Last Post: 13th February 2008, 12:32
  5. Line not being created
    By Kapil in forum Newbie
    Replies: 4
    Last Post: 30th March 2006, 06:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.