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. QPushButton's are not clickable inside QFrame
Qt 6.11 is out! See what's new in the release blog

QPushButton's are not clickable inside QFrame

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.0k 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

    Hi i have QGridLayout having two PushButtons.
    what i am doing is
    QFrame *frame=new QFrame;
    frame->setLayout(gridLayout);
    frame->setStylesheet("border-width:1px");
    Dockwidget ->setWidget(frame);

    Now inside frame the i am unable to click on PushButtons.

    Kindly help.

    Thanks

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

      Hi,

      Can you also show the QPushButton related part ?

      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
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        sure..

        m_btn1=new QPushButton("Add");
        m_btn1->setMaximumWidth(30);

        gridLayout->addWidget(m_btn1,0,0);
        similarly other button is added at (0,1) position in gridLayout.

        When i am setting frame border to none then the QPushButtons becomes clickable. Its only when frame border is set the Buttons are losing their cilckable property.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          clochydd
          wrote on last edited by
          #4

          Hi,
          do you use checkable QPushButtons? I had a similar problem if the buttons were checkable.

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

            What version of Qt are you using on which OS ?

            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