sketchucation logo sketchucation
    • Login
    1. Home
    2. archonmaster
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 1

    archonmaster

    @archonmaster

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    archonmaster Unfollow Follow
    registered-users

    Latest posts made by archonmaster

    • RE: Qt4 GUI in Ruby for Sketchup plugin's

      I also want to use QT for user interface. Is there any examples?
      I decide to create thread and execute main loop of QT application in this thread.
      [pre:g779cno0]DWORD WINAPI mainLoop(CONST LPVOID lpParam) {
      coreDataStruct * data = (coreDataStruct *)lpParam;

      int argc = 0;
      char **argv = 0;
      
      data->app = new QApplication(argc, argv);
      data->app->setQuitOnLastWindowClosed(false);
      data->app->exec();
      
      data->active = 0;
      ExitThread(0);
      

      }
      VALUE cModule_initialize(...) {
      if (coreData->active == 0) {
      HANDLE thread = CreateThread(NULL, 0, &mainLoop, (void*)coreData, 0, NULL);
      coreData->mainThread = thread;
      coreData->active = 1;
      return Qtrue;
      }
      return Qfalse;
      }[/pre:g779cno0]
      Thread is created in function cModule_initialize that should be executed in the begining
      To create window I have this function:
      [pre:g779cno0]VALUE cModule_createWin(...) {
      if (coreData->active == 0) return Qfalse;
      QDialog *dialog = new QDialog;
      dialog->show();
      return Qtrue;
      }[/pre:g779cno0]
      Is that correct?

      posted in Developers' Forum
      A
      archonmaster