Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. button
    Log in to post
    • All categories
    • R

      Unsolved foreground property with QML Button
      QML and Qt Quick • button qml foreground • • Reddy_12

      3
      0
      Votes
      3
      Posts
      31
      Views

      GrecKo

      @JoeCFD Layouts are visual items...

    • U

      Solved [c++] opening window B by clicking a button on window A
      General and Desktop • c++ button window • • Uchi

      8
      0
      Votes
      8
      Posts
      186
      Views

      JonB

      @Uchi
      Correct! At the time the connect() statement is issued both the signal & slot objects must be set to the instances to be connected, that's what connect() does. Changing either of the objects later to an instance has no effect on the earlier connect().

    • R

      Unsolved Why I'm not secceed to change the posiyion of the button? helpp c++ qt
      Tools • layout c++ position button • • RuWex

      13
      0
      Votes
      13
      Posts
      220
      Views

      JonB

      @JonB
      You have (for unknown reason) placed a button at row #5 column #6 and spanning 5 rows and 2 columns. It's not going to make much sense, is perhaps not what you intend, and will move around when you place other widgets on the grid layout.

      I know nothing about "In the gray square there should have been a cube. that I opened",

      The second shot shows about what I expect when you didn't use any layout. If the 3 lines of text there were deliberate you would need to put them into the layout now if you expect to see them.

    • R

      Solved How to create a button and place it where I want and then run a function when the button is clicked C++ QT
      Tools • c++ qt button clickevent • • RuWex

      17
      0
      Votes
      17
      Posts
      494
      Views

      R

      @jsulm ou! thank you!
      you had helped me a lot!!

    • Emrecp

      Unsolved Custom Button, paintEvent issue
      Qt for Python • pyqt5 pyside6 custom widget paintevent button • • Emrecp

      11
      0
      Votes
      11
      Posts
      192
      Views

      SGaist

      The smoothing done for the antialiasing will not be the same for all colors.

    • CJha

      Unsolved Different behaviour of icons in vista style vs fusion style?
      General and Desktop • fusion button icons • • CJha

      4
      0
      Votes
      4
      Posts
      222
      Views

      Christian Ehrlicher

      @mrjj Yes, sorry :D

    • D

      Solved Open serial port when clicked the button
      General and Desktop • serialport button crashed • • deleted286

      4
      0
      Votes
      4
      Posts
      224
      Views

      Christian Ehrlicher

      @suslucoder Then mark the topic as solved.

    • K

      Solved Restored window after minimizing is not maximized
      QML and Qt Quick • minimize visibility button window qml • • Krakenus00

      3
      0
      Votes
      3
      Posts
      550
      Views

      K

      Omg, I've just ORed the flags, and now it works as intended.
      In QtWidgets it should be:

      // To set the window minimized setWindowState(windowState() & ~Qt::WindowActive | Qt::WindowMinimized); // To restore the window from minimized state setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive);

      So in QML it should work in the same way.

    • Ratzz

      Solved Access item inside ListView via delegate
      QML and Qt Quick • qml listview delegate button • • Ratzz

      14
      0
      Votes
      14
      Posts
      1250
      Views

      Ratzz

      @GrecKo , I mean without the button, when I edit the values of TextEdit, I should be able to get the modified text. I tried via property. It always gave me empty

    • A

      Solved Button receiving clicked events even when behind a rectangle item and not visible in screen.
      QML and Qt Quick • qtquick control button event propogati clickevent overlap • • Ashvit

      3
      0
      Votes
      3
      Posts
      861
      Views

      A

      @fcarney Thankyou for the prompt reply, your solution does solve my problem.

    • O

      Unsolved Qt QuickTest and native dialogs
      QML and Qt Quick • qtquicktest native dialog simulate button click • • Oliver Starke CEOS

      1
      0
      Votes
      1
      Posts
      160
      Views

      No one has replied

    • K

      Unsolved QML proper using nested functions
      QML and Qt Quick • qml function nested style button • • Kyeiv

      2
      0
      Votes
      2
      Posts
      250
      Views

      rrlopez

      Hi @Kyeiv, I just did a quick test application and it worked for me:

      main.qml

      import QtQuick 2.9 import QtQuick.Window 2.2 import "someJSscriptFile.js" as Jss Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Rectangle { id: rect color: Jss.getCurrentColor() anchors.fill: parent } }

      someJSScriptFile.js

      function getCurrentColor() { return __getColor(rect.currentValue) } function __getColor(value) { if (rect.pressed) { return "grey" } if(rect.activated === false) { return "white" } if(value ===0) { return "red"; } return "green"; }

      Is the variable "control" defined in your QML? Or what are you trying to use it for?

    • Pivot15

      Unsolved How to create a button in Qt 3D Studio
      General and Desktop • 3dstu qml button buttons element • • Pivot15

      1
      0
      Votes
      1
      Posts
      272
      Views

      No one has replied

    • L

      Solved Check if button was right clicked or left clicked?
      General and Desktop • right-click button qmouseevent • • legitnameyo

      15
      0
      Votes
      15
      Posts
      4007
      Views

      L

      Solved it by creating a derivative of the CustomQPushButton class definition! Thanks!

    • L

      Solved check for clicks on buttons inside a vector?
      General and Desktop • button vector dynamically • • legitnameyo

      7
      0
      Votes
      7
      Posts
      737
      Views

      SGaist

      Rather than using a bunch of ifs, what about using a QMap or a QHash to store the information and retrieve that in the slot ? This will make your implementation easier to maintain.

    • D

      Unsolved DRY with Actions in QtControls 2
      QML and Qt Quick • control 2 action dry button menuitem • • Devinder

      1
      0
      Votes
      1
      Posts
      307
      Views

      No one has replied

    • M

      Solved Custom Widgets on qt designer
      General and Desktop • pyqt5 custom button • • MafiaSkafia

      5
      0
      Votes
      5
      Posts
      1622
      Views

      M

      @mrjj okay thank you very much! And yes, my Designer also have a StyleSheet editor like this:

      0_1528759090155_style.PNG

      Cheers

    • VAIBHAVSRI

      Unsolved Animated Button Border
      QML and Qt Quick • border borderimage qtcreator qml button • • VAIBHAVSRI

      2
      0
      Votes
      2
      Posts
      744
      Views

      sierdzio

      There is no straightforward API for this. I see several possibilities:

      custom painting in QQuickPaintedItem custom painting in QQuickItem custom painting via GL shaders custom painting in QML Canvas a set of 4 animated Rectangle components, simulating the line. An ugly solution, but probably the easiest to do

      Perhaps BorderImage component can be forced to do an animation like that, but I doubt it.

    • Guy Gizmo

      Solved QComboBox and QPushButton in a grid layout do not line up properly in macOS
      General and Desktop • mac-os gridlayout button combobox • • Guy Gizmo

      15
      0
      Votes
      15
      Posts
      5042
      Views

      MrKozmon

      Checkout the answer I have given here:
      https://forum.qt.io/topic/105191/why-isn-t-a-qcombobox-positioned-correctly-in-a-layout