Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to redefinition QT function?

How to redefinition QT function?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 380 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TomNow99
    wrote on last edited by TomNow99
    #1

    Hello,

    I know that is strange, but I would like to learn how to redefinition ( or add new ) function of another QT class.

    For example class QScreen and function grabWindow(WId window, int x = 0, int y = 0, int width = -1, int height = -1). I would like to write new my grabWindow(WId window, int x = 0, int y = 0, int width = -1, int height = -1) or create grabWindow2(WId window, int x = 0, int y = 0, int width = -1, int height = -1).

    How I should that?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by
      #2

      In C++ you can't redefinition or add new function to any class defined in the libraries.
      You can only subclass it.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved