Results 1 to 5 of 5

Thread: Weird problem while porting from Qt3 to Qt4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Weird problem while porting from Qt3 to Qt4

    I don't know.
    Maybe your friend has an older version of the libraries?

    Could you post that code?. The one that handles the file dialog.
    Maybe you have something in there that depends on something on your machine.

    Anyway, QFileDialog falls back to the platform file dialog(s). Shouldn't be any problem exactly in the Qt file dialog implementation.

    Regards

  2. #2
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Weird problem while porting from Qt3 to Qt4

    Quote Originally Posted by marcel View Post
    Could you post that code?. The one that handles the file dialog.
    Maybe you have something in there that depends on something on your machine.
    Regards
    Here is the code
    Qt Code:
    1. void MainWindow::fileOpen()
    2. {
    3. saveBeforeOpening();
    4. QTextCodec *codec = QTextCodec::codecForLocale();
    5. QString fileName = codec->fromUnicode( QFileDialog::getOpenFileName(
    6. this, QString::null, "*.syn;;*.r" ) );
    7. if( fileName.isEmpty() )
    8. {
    9. emit explain( tr("Open file dialog cancelled") );
    10. }
    11. else
    12. {
    13. openFile( fileName );
    14. }
    15. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by vermarajeev; 8th August 2007 at 04:31.

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Weird problem while porting from Qt3 to Qt4

    Well:
    1) Text what codecForLocale returns ( although it should never be NULL, maybe for some weird encoding ).

    2) Double-check the slot connected to explain signal.

    3).Double-check the openFile slot.

    Regards

  4. #4
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Weird problem while porting from Qt3 to Qt4

    Quote Originally Posted by marcel View Post
    Well:
    1) Text what codecForLocale returns ( although it should never be NULL, maybe for some weird encoding ).

    2) Double-check the slot connected to explain signal.

    3).Double-check the openFile slot.

    Regards
    Solved, I didnt ship the translation files with the exe. My mistake.
    Anyway,
    Thanks for your help, Marcel

Similar Threads

  1. Font Problem Porting from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2007, 10:25
  2. Problem related to porting from QT3 to QT4 in list items
    By rohitjun in forum Qt Programming
    Replies: 5
    Last Post: 1st June 2007, 09:05
  3. Problem porting Kivio MP on win32 from Qt 3 to Qt 4
    By Amanda in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2006, 19:40
  4. Problem in porting Main window on linux
    By jyoti kumar in forum Qt Tools
    Replies: 2
    Last Post: 2nd June 2006, 08:35
  5. Porting problem from Qt3 to Qt4
    By Krishnacins in forum Qt Programming
    Replies: 2
    Last Post: 19th May 2006, 14:29

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.