Results 1 to 4 of 4

Thread: API functions in Qt?

  1. #1
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default API functions in Qt?

    hi all
    how to use windows API functions in Qt?
    such as GetAsyncKeyState() , SetWindowRgn() , SetCursorPos() ,....

    another problem..
    how to execute an application in my program?
    for example: calc.exe

    regards

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: API functions in Qt?

    Take a look at QKeyEvent, QWidget::setMask, QCursor::setPos, QProcess::execute

  3. The following user says thank you to mentalmushroom for this useful post:

    Ali Reza (5th June 2012)

  4. #3
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: API functions in Qt?

    Thanks a lot mentalmushroom

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,642
    Thanks
    13
    Thanked 1,592 Times in 1,520 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: API functions in Qt?

    Quote Originally Posted by Ali Reza View Post
    how to use windows API functions in Qt?
    Qt is a library not a compiler or language. You can use Windows API functions from any language that supports accessing the binary interface of the Windows libraries: this includes C++. You do this exactly same way you would do it if you program was not using Qt libraries at all.

    However, as has been pointed out above, the Qt libraries provide portable (mostly) alternate mechanisms for all the examples you quoted.

Similar Threads

  1. C++ virtual functions
    By sonulohani in forum Newbie
    Replies: 3
    Last Post: 23rd May 2012, 09:17
  2. C++ Static Functions
    By weaver4 in forum Newbie
    Replies: 7
    Last Post: 17th November 2009, 10:42
  3. Regards CallBack Functions
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2009, 16:16
  4. Using a frame for different functions
    By anafor2004 in forum Newbie
    Replies: 1
    Last Post: 29th January 2008, 13:45
  5. Mathematical Functions
    By krishbhala in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2008, 13:55

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.