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

How to refresh a widget

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.6k 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.
  • U Offline
    U Offline
    user001
    wrote on last edited by
    #1

    I have a QDialog with three QPushbuttons, yes, sureYes, no. Just want to play with Qt. I want to have the no button is the default each time when dialog shows. I called noBtn->setDefault(true) and then *this->update() *before I call show() to display the dialog. But it desn't work. which method I should call to make the noBtn always gain the focus when it shows?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      The default button is the one actioned by pressing Enter (if an autoDefault button does not have focus), It does not necessarily have the focus. If you want that button to have the focus call noBtn->setFocus().

      No need to call update() at all (pointless before it is shown anyway),

      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