コンソールの以下の警告が出たら(エラーになる可能性もあり)
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
void chartpane::Plot(void )
{
QPainter(this);
...
...
QPainter(this)が、paintEvent以外の関数から呼ばれるときに表示される。
QPainter(this)を含む関数は、paintEvent以外の関数から呼んではいけない。
そのような関数は直接コールせず、paintEvent に含めた上で、repaint()を呼ぶ。
This warning appears when "QPainter(this)" is called inside the function other than paintEvent.
Function that include "QPainter(this)" should be called only from paintEvent.
Do not call such function directory, instead include it in paintEvent and call repaint() function.
2013年8月18日日曜日
2013年6月23日日曜日
Qt5 デスクトップ・プログラムのシステム設定
Qt5でデスクトップのプログラムを作り、Visual Studioでビルドして、実行すると、メイン・ウィンドーの他にコンソールが開く。
コンソールを開きたくない場合
プロジェクトの『Property Page』画面を開き、
(1)Linker→Systemを、『Windows(/SUBSYSTEM:WINDOES)』に変える。
(2)下記のリンク・エラーが出たら、Linker→Adcancedで、『Entry Point』を『mainCRTStartup』とする
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol WinMain referenced in function __tmainCRTStartup
コンソールを開きたい場合(デバッグなど)
プロジェクトの『Property Page』画面を開き、
(1)Linker→Systemを、『Console(/SUBSYSTEM:WINDOES)』に変える。
(2)Linker→Adcancedで、『Entry Point』をブランクにする。
参考:
Hide console of Windows Application
http://stackoverflow.com/questions/2139637/hide-console-of-windows-application
コンソールを開きたくない場合
プロジェクトの『Property Page』画面を開き、
(1)Linker→Systemを、『Windows(/SUBSYSTEM:WINDOES)』に変える。
(2)下記のリンク・エラーが出たら、Linker→Adcancedで、『Entry Point』を『mainCRTStartup』とする
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol WinMain referenced in function __tmainCRTStartup
コンソールを開きたい場合(デバッグなど)
プロジェクトの『Property Page』画面を開き、
(1)Linker→Systemを、『Console(/SUBSYSTEM:WINDOES)』に変える。
(2)Linker→Adcancedで、『Entry Point』をブランクにする。
参考:
Hide console of Windows Application
http://stackoverflow.com/questions/2139637/hide-console-of-windows-application
2013年6月18日火曜日
Qt5: Failed to load platform plugin “windows”
Qt5
If you see this error when you start Qt program...
Failed to load platform plugin “windows”. Available platforms are:
create a directory called 'platforms' at the directory where the executable file is located and copy qwindows.dll in there.
Directories should look like:
+
|
+- program.exe
+- Qt5Core.dll
+- Qt5Gui.dll
+- Qt5Widgets.dll+- ........
+- other dll's
|
+- platforms / qwindows.dll
If you see this error when you start Qt program...
Failed to load platform plugin “windows”. Available platforms are:
create a directory called 'platforms' at the directory where the executable file is located and copy qwindows.dll in there.
Directories should look like:
+
|
+- program.exe
+- Qt5Core.dll
+- Qt5Gui.dll
+- Qt5Widgets.dll+- ........
+- other dll's
|
+- platforms / qwindows.dll
2012年3月12日月曜日
Qt 4.8.0 namkeのエラー
As I installed 4.8.0 from qt-win-opensource-4.8.0-vs2008.exe on my machine and tried to build it, nmake stopped with this error message;
DefaultLocalizationStrategy.cpp(327) : “error C2001: newline in constant”
…..
It was built on English Windows 7 SP1 with VS9, but I set “Language for non-Unicode programs” to Japanese as I work for some clients from Japan.
I switched it back to English and re-run the configuration(configure -platform win32-msvc2008 -debug-and-release) and then nmake. It went through without any error.
This is done by using “Control Panel” -> “Region and Language”, and pressing “Change System Locale” on “Administrative” Tab to choose English as “Current System Locale”. You have to reboot the PC.
After nmake is completed successfully, I switched it back to Japanese and 4.8.0 is working well so far.
DefaultLocalizationStrategy.cpp(327) : “error C2001: newline in constant”
…..
It was built on English Windows 7 SP1 with VS9, but I set “Language for non-Unicode programs” to Japanese as I work for some clients from Japan.
I switched it back to English and re-run the configuration(configure -platform win32-msvc2008 -debug-and-release) and then nmake. It went through without any error.
This is done by using “Control Panel” -> “Region and Language”, and pressing “Change System Locale” on “Administrative” Tab to choose English as “Current System Locale”. You have to reboot the PC.
After nmake is completed successfully, I switched it back to Japanese and 4.8.0 is working well so far.
登録:
投稿 (Atom)