Results 1 to 2 of 2

Thread: QT4 in Visual Basic 2010 writing in Python

  1. #1
    Join Date
    Feb 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QT4 in Visual Basic 2010 writing in Python

    Hi Everyone,

    I'm an absolute beginner when it comes to python and QT4. I programmed in VB10 for a semester and am trying to use VB10 to design a few GUI's.

    I'm doing research in molecular modeling and the programs are written in python. The programs don't have GUI's associated with them and it is currently my task to create and link them to the modeling simulation programs.

    I am familiar with Visual Studio 2010 and have added the .NET 4 Framework of QT4 into VB. I can create my GUI and reasonably map the buttons. However, in order to have the controls do anything other than the predetermined commands I need to be able to code the buttons individually.

    I have absolutely no idea how to get the code to show up in VB. And I need it to show up in python.

    Help and suggestions would be absolutely wonderful. I can provide screen shots or anything else. However, I am not a programmer so please bear with me as I struggle through this.

    Thank you

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    24
    Thanked 17 Times in 14 Posts

    Default Re: QT4 in Visual Basic 2010 writing in Python

    Hi,

    Let me see if I get it right... I do modelling on agricultural research :

    Most of your models are in python, they don't have a GUI and its your task to link them and create some GUI for them.

    Since this forum is for QT I will write thinking you intent to use QT and not VB .

    Assumptions:
    1. The python scripts need certain inputs and produces certain outputs in stdin
    2. You don't want to embed Python code in Qt just run an Python script from Qt.

    How I would do it:

    1. Create the GUIs using QT Creator - This IDE is IMHO the best to create Qt applications and is easier than VB. Get it from Nokia.
    2. The GUI basically will have the input parameters, will run the python scripts and process its output.
    3. Use a QProcess inside a QThread to run phyton script. It is useful to separate the python script inside another thread so the GUI can get any output without hanging.
    4. Use QTextStream to read from the stdin. This will read the output generated by the python script.
    5. Wait until the python finish.
    6. Process the QTextStream and write the result of the model in the GUI.

    I can give you a hand (stating bits) if you provide me with a very basic python script to test..

    Good luck.
    Carlos

Similar Threads

  1. Qt add in Visual Studio 2010 problem
    By qtmude in forum Installation and Deployment
    Replies: 2
    Last Post: 18th January 2012, 15:41
  2. Visual studio 2010 interference
    By The physicist in forum Installation and Deployment
    Replies: 3
    Last Post: 14th January 2011, 10:43
  3. Qt and Visual Studio 2010
    By SixDegrees in forum Qt Programming
    Replies: 6
    Last Post: 15th November 2010, 20:56
  4. Visual Studio Plugin (1.1.6) crashes Visual Studio (2010)
    By mboeni in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 17:46
  5. Plan for Visual Studio 2010 (MSVC 2010)?
    By Vinzz in forum Qt Programming
    Replies: 1
    Last Post: 18th April 2010, 18:42

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.