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. giving a custom button class new properties
Forum Updated to NodeBB v4.3 + New Features

giving a custom button class new properties

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 155 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.
  • N Offline
    N Offline
    Natural_Bugger
    wrote on last edited by
    #1

    hello,

    i would like to give my custom button class some new properties to position the button.
    that overrides the existing.

    const QSize btnSize = QSize(150, 150);
        this->setFixedSize(btnSize);
    
    centerX
    centerY
    

    what would be most "hardcore" approach possible.
    keeping in mind if the size is 50 x 50.

    just doing some positioning experiments.

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

      Hi,

      What kind of properties do you have in mind ?
      You can move your button from the widget that created it with the pos properly method for example.

      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
      0

      • Login

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