Results 1 to 9 of 9

Thread: Qt's power

  1. #1
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt's power

    Hey,
    I was wondering about what exactly does Qt have power over. For example, can it interact with windows such as making system icons on the system tray? Can it change the desktop background? Basically all this is possible with win32 api, but is it possible with Qt? Or is it possible to integrate them, such as use a bit of win32 api while using Qt?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt's power

    Quote Originally Posted by VireX View Post
    For example, can it interact with windows such as making system icons on the system tray?
    Yes, QSystemTrayIcon was introduced in Qt 4.2.

    Can it change the desktop background? Basically all this is possible with win32 api, but is it possible with Qt?
    That's pretty much desktop environment specific. Qt does not help you with this.

    Or is it possible to integrate them, such as use a bit of win32 api while using Qt?
    Sure, you can use win32 api if you want to. Qt uses it too.
    J-P Nurmi

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

    VireX (14th January 2007)

  4. #3
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt's power

    Thanks for finding the Systemtray one, I was going over the list of classes and didn't see it.
    I know Qt uses it too, however, sometimes using both at same time may cause problems I thought.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt's power

    Quote Originally Posted by VireX View Post
    I know Qt uses it too, however, sometimes using both at same time may cause problems I thought.
    There is no "using both". When programming for Windows eventually WinAPI calls are always made. Qt does its job on Windows using WinAPI, like all other toolkits/frameworks/APIs/etc. do. WinAPI is the API presented by Windows to the outside world (MFC also uses WinAPI and AFAIK .NET uses WinAPI as well).

  6. #5
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt's power

    I know that, I've had many years of Win API experience, but I'm saying they might have special things in place, that might cause problems when using both at same time. Since I haven't read the source code of Qt, and I haven't seen any program that uses both at same time, I was just asking to be sure.

  7. #6
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt's power

    As wysota had mentioned Qt uses Win32 Api. Your statement sounds like, Using Win32 with Win32 can create problems ? Can you be a little more precise ? Where exactly are you facing problems ?
    We can't solve problems by using the same kind of thinking we used when we created them

  8. #7
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt's power

    I told you, I understood that now. I thought BEFORE that there could be a possibility that because it has abstracted the win api layer, it might change things, redefine things, that could conflict with the program flow of Qt. As I said, I haven't read the source code of Qt, so I don't know what kind of programming and changes they have done. NOW I understand, that there is no conflict, and it makes sense, I was just asking to be sure.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt's power

    Actually you may encounter conflicts, altough they are rare. But the conflicts are caused by the WinAPI itself (for example Qt calls some method internally, so you can't call it again with different parameters yourself as it may break something else), I remember there was such an issue brought up (about threading? I'm not sure...) on the forum some time ago and it was probably caused by a situation I described above. But as I said - these cases are really rare (I've encountered only this one issue since I started dealing with Qt questions), so you shouldn't worry upfront.

  10. The following user says thank you to wysota for this useful post:

    VireX (16th January 2007)

  11. #9
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt's power

    Yeah that's what i was afraid of. But anyway I understand that it isn't a very common problem.

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.