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

setGeometry deprecated

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 349 Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I wrote:

      QRect screenRect = QApplication::desktop()->screenGeometry(1); // 0-indexed, so this would get the second screen
        
           this->move(QPoint(screenRect.x(), screenRect.y()));
    
    

    but it's deprecated, so how I can write?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What setGeometry are you talking about ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @vale88

        I'm pretty sure I suggested to you to use screens() to query your desktop

        QRect screenRect = QGuiApplication::screens().at(1)->availableGeometry();
        

        You're aware that you're not checking if 2 screens are available before hand. This may at any time crash.

        @SGaist setGeometry == screenGeometry, I presume.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        3

        • Login

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