Results 1 to 7 of 7

Thread: Trouble with resolution

  1. #1
    Join Date
    Feb 2007
    Posts
    9
    Thanks
    3

    Default Trouble with resolution

    1. How can I change resolution using QT4? A simple example will be appreciated. I must use Windows\Linux functions or is another way to do this?

    2. I have "QImage *image" and I do:
    image = new QImage("../Images/bMMenu.jpg");
    if( image->isNull() ){
    QMessageBox::about(this, tr("ERROR"),
    tr(" I can't find bMMenu.jpg"));
    }
    and when I compile \ run program everything is OK. The image is painted od Widget. When move everthing to another directory it works too. But when I copy files to another computer image->isNull() return true and of course I have black screen. I don't understand what I do wrong? On one computer everuthing is OK, simple Copy->Paste to another and it didn't work

    Second computer is without QT. I copy also DLL's.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trouble with resolution

    Quote Originally Posted by Xaar View Post
    1. How can I change resolution using QT4? A simple example will be appreciated. I must use Windows\Linux functions or is another way to do this?
    Do you mean the display's resolution?

    Quote Originally Posted by Xaar View Post
    But when I copy files to another computer image->isNull() return true and of course I have black screen.
    You have to copy the QJPEG plugin too (it should be in the imageformats subdirectory of the directory where your executable is).

  3. #3
    Join Date
    Feb 2007
    Posts
    9
    Thanks
    3

    Default Re: Trouble with resolution

    Quote Originally Posted by jacek View Post
    Do you mean the display's resolution?
    Yes. I call QWidget::showFullScreen() and I want to set also resolution.

    Quote Originally Posted by jacek View Post
    You have to copy the QJPEG plugin too (it should be in the imageformats subdirectory of the directory where your executable is).
    It didn't help.
    Last edited by Xaar; 21st February 2007 at 23:06.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trouble with resolution

    Quote Originally Posted by Xaar View Post
    Yes. I call QWidget::showFullScreen() and I want to set also resolution.
    I haven't seen any function in Qt that would allow you to do that, so probably you will have to do that using some platform-dependent code.

    Quote Originally Posted by Xaar View Post
    It didn't help.
    Hmmm... but it should, at least for JPEG files. Which file did you copy and where?

  5. #5
    Join Date
    Feb 2007
    Posts
    9
    Thanks
    3

    Default Re: Trouble with resolution

    Quote Originally Posted by jacek View Post
    Hmmm... but it should, at least for JPEG files. Which file did you copy and where?
    I copy qjpeg1.dll and qjpegd1.dll to directory where i have exe file.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trouble with resolution

    Quote Originally Posted by Xaar View Post
    I copy qjpeg1.dll and qjpegd1.dll to directory where i have exe file.
    OK, then create imageformats subdirectory and move those DLL there (qjpegd1.dll is a debugging version of the plugin, so you probably don't need it).

  7. The following user says thank you to jacek for this useful post:

    Xaar (23rd February 2007)

  8. #7
    Join Date
    Feb 2007
    Posts
    9
    Thanks
    3

    Default Re: Trouble with resolution

    Quote Originally Posted by jacek View Post
    OK, then create imageformats subdirectory and move those DLL there (qjpegd1.dll is a debugging version of the plugin, so you probably don't need it).
    This is what I need. Big thanks

Similar Threads

  1. Replies: 18
    Last Post: 6th February 2007, 14:06
  2. New to QT..need help guys..sorry for the trouble
    By neomax in forum General Discussion
    Replies: 2
    Last Post: 17th November 2006, 16:20
  3. Screen Resolution
    By vijay anandh in forum Qt Programming
    Replies: 3
    Last Post: 6th October 2006, 13:47
  4. addDockWidget && removeDockWidget trouble
    By krivenok in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2006, 14:46
  5. http trouble again, segfaults when no internet
    By Bojan in forum Qt Programming
    Replies: 6
    Last Post: 18th January 2006, 20:25

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.