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. [Resolved] How to disable a button in a button box?

[Resolved] How to disable a button in a button box?

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

    bq.
    C:\Qt_Projects\Hello10\dialog.cpp:9: error: invalid use of incomplete type 'class QPushButton'
    ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
    ^

    caused by

    @
    ui->setupUi(this);
    ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
    @

    What does it mean ?
    I tried to read the doc but this seems to be ok.

    'ui' is a form designer generated form
    'buttonBox' is the objectName of a ... buttonBox

    1 Reply Last reply
    0
    • R Offline
      R Offline
      realtebo
      wrote on last edited by
      #2

      I found the answer:

      in the dialog header i have to do this:

      @
      #include <QPushButton>
      @

      1 Reply Last reply
      1
      • G Offline
        G Offline
        guru
        wrote on last edited by
        #3

        Hi, Realtebo,

        mark it as solved.

        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