C++

webアプリをネイティブアプリっぽく使えるようになった

試しにGoogle moogをwindowsで使えるようにしてみた 終了は右クリックから debugとreleaseで違いが出る debugでビルドするとちゃんと出来るのに、releaseでビルドすると「プラグイン足りてないよ」的な、?マーク(はてなマーク)が表示されるdebugビルド時 …

QGraphicsViewにおけるイベント処理

昨日のやつに クリックイベント処理 ドラッグによる移動 を追加した #include <QtGui> class MyPixmapItem : public QGraphicsPixmapItem { private: bool isDragged; // ドラッグ中フラグ QPoint mpos, wpos; // ドラッグ開始時点のマウス位置、ウィンドウ位置 pub</qtgui>…

ifstreamからint, doubleなどのキャスト

C++

ifstreamからテキストファイル読んでintやらdoubleやらにキャストするので詰まった template < class T > void Dtw< T >::readFile( std::vector< T > &dst, const char* path ) { std::ifstream fs( path ); T temp; if( !fs ) { std::cout << "Error: cann…

C++でオブジェクト生成時の ”which is of non-class type” なんとか

C++

C++でオブジェクト生成時 #include "watch.hpp" int main( int argc, char** argv ) { Watch watch(); watch.start(); // なんか処理 watch.stop(); std::cout << "計算時間 : " << watch.getInterval() << " sec" << std::endl; return 0; } ↑みたいにした…