PDA

View Full Version : Trouble with resolution



Xaar
21st February 2007, 22:41
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 :confused:

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

jacek
21st February 2007, 22:51
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?


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).

Xaar
21st February 2007, 22:55
Do you mean the display's resolution?
Yes. I call QWidget::showFullScreen() and I want to set also resolution.


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.

jacek
22nd February 2007, 22:36
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.


It didn't help.
Hmmm... but it should, at least for JPEG files. Which file did you copy and where?

Xaar
23rd February 2007, 07:45
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.

jacek
23rd February 2007, 10:34
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).

Xaar
23rd February 2007, 18:58
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 :D :D :D