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?
Forum Updated to NodeBB v4.3 + New Features

How to redefinition QT function?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 308 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 31 Jul 2020, 06:03 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 31 Jul 2020, 06:12 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

      1/2

      31 Jul 2020, 06:03

      • Login

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