Qt Forum

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

      Solved QtCharts and QDialog
      General and Desktop • qcharts qdialog • • Davide00

      2
      0
      Votes
      2
      Posts
      97
      Views

      jsulm

      @Davide00 said in QtCharts and QDialog:

      can I show a chart in a QDialog?

      Yes

      "And if yes, how can i do it?" - what exactly is the problem? Simply add your chart as child widget in your dialog.

    • R

      Unsolved Qdialog keypressevent not triggering
      General and Desktop • qdialog keypressevent simple • • ranaila

      2
      0
      Votes
      2
      Posts
      92
      Views

      SGaist

      Hi,

      Did you give the focus to your dialog ?

      It also looks like you have other widgets which will have keyboard focus.

    • B

      Unsolved Dialog Box return values
      General and Desktop • c++ dialog box qdialog return value • • BigBen

      3
      0
      Votes
      3
      Posts
      128
      Views

      JonB

      @BigBen
      Assuming you are wanting to return those values as soon as the startButton is clicked, you can just call void QDialog::done(int r) with the desired value. Or do that later with the value if you want it returned later.

    • Emrecp

      Unsolved QDialog in QMainwinndow and make the background dark
      Qt for Python • python qmainwindow qdialog child widget • • Emrecp

      6
      0
      Votes
      6
      Posts
      406
      Views

      SGaist

      So you want a modal dialog that is in fact loaded within a widget inside your QMainWindow class ?

      You can manually set the modality of your dialog with setModal.

    • CJha

      Unsolved QDialog: Reasons for avoiding exec()?
      General and Desktop • qdialog exec • • CJha

      3
      0
      Votes
      3
      Posts
      343
      Views

      kkoehne

      The best summary is probably still https://www.qt.io/blog/2010/02/23/unpredictable-exec - wow, 12 years ago! I'm getting old ;)

      From my own experience, QDialog::exec() is usually fine, especially for modal dialogs. But the exact interactions depends a lot on all the other things you're doing in your app ...

    • R

      Unsolved How to preserve QDialog widget size after hide/show
      General and Desktop • qdialog • • RedSoft

      3
      0
      Votes
      3
      Posts
      199
      Views

      Christian Ehrlicher

      @RedSoft said in How to preserve QDialog widget size after hide/show:

      but the size is reset to its initial size, despite user previously resized it.

      And you're sure you don't have a resize() somewhere? Please check with an empty class derived from QDialog - the size will not change for sure.

    • L

      Solved double free or corruption (out) when closing a QDialog with the WA_DeleteOnClose attribute set
      General and Desktop • qdialog deletelater • • LRDPRDX

      21
      0
      Votes
      21
      Posts
      896
      Views

      H

      @LRDPRDX

      In terminal, "double free or corruption (out)" message is printed after the destructor has been called.

      Update: Sorry for bothering you. I was having similar issue. I saw your post in stackoverflow and then my problem solved when I allocated my QMainWindow object in heap instead of the stack.

      Many thanks!

    • D

      Unsolved How to disable all options of QDialog closure
      General and Desktop • qdialog • • Dariusz

      8
      0
      Votes
      8
      Posts
      561
      Views

      JonB

      @Cobra91151
      Which is what I suspected, hence the question.

      Your original answer made the nativeEvent interception look "optional" ("you can modify"), now the OP knows it is mandatory.

    • smbika

      Unsolved setupUi
      General and Desktop • c++ qt5 gui qdialog • • smbika

      7
      1
      Votes
      7
      Posts
      2328
      Views

      smbika

      @Chris-Kawa Thanks for the insight. I think the system I am working on is similar in evolutionary history. There are just a few setupUi() methods in it and the rest of the uis are heavily wrapped in extended classes. I think all I need is that first clue but I may be able to suss it out myself. That would be nice...pat on the back sorta nice...:-)

      Again, thanks! I appreciate the help!

    • O

      Solved Dialog does not close correctly
      General and Desktop • qdialog close • • OlivierDz

      3
      0
      Votes
      3
      Posts
      210
      Views

      O

      @JonB said in Dialog does not close correctly:

      Thanks, it works now.

      I created a custom slot for the Cancel button in my CMyDialog class.
      I this slot a put this->parentWidget()->close().
      This solved the problem.

    • L

      Unsolved How to populate values in my Qdialogbox's linedits?
      General and Desktop • c++ qt 5.4 qdialog qlineedit qmainwindow • • learnist

      6
      0
      Votes
      6
      Posts
      256
      Views

      SGaist

      Hi,

      exec is a blocking call so basically you modify your dialog content after you dismiss it.

    • nicmorais

      Solved Pass value to Dialog/set Values
      General and Desktop • qdialog pass value qlineedit • • nicmorais

      7
      0
      Votes
      7
      Posts
      814
      Views

      nicmorais

      Wow! Thank you @JonB, this solved my issue. One more solved topic to the forum.
      Have a nice a nice day!

    • M

      Unsolved How to access the OK button in QDialog's buttonBox and use it to stop a thread
      General and Desktop • c++ qt 5.4 qdialog qlistwidget qthread • • Mr-Workalot

      3
      0
      Votes
      3
      Posts
      720
      Views

      SGaist

      By the way, how are your buttons connected ?
      You might want to rather call the dialog's accept slot from on_buttonBox_accepted rather than connecting it directly to your button.

    • M

      Unsolved Dialog UI freezed/unresponsive until all the elements are finished loading into my Qlistwidget. Any way to solve this?
      General and Desktop • c++ qt 5.4 qdialog qlistwidget threads • • Mr-Workalot

      2
      0
      Votes
      2
      Posts
      233
      Views

      mrjj

      Hi
      10.000 items take some time to create and add.

      Print_Descendants_key must not touch/access the ListWidget from the other thread. that will not be good.

      To make the UI less hanged while adding such a number of items, you can do 3 things.

      1: use a View + custom model instead.
      If you already have all the data in a list/vector, a custom model on top of that would be super fast.
      2:
      Use a thread to send data to main. Make sure the thread is not hammering the
      main gui as that would lag too. You can also use a QTimer and simply slow down the adding.
      3:
      Do the ugly trick of calling QApplication::processEvents() (in the loop that adds the items)
      to allow the main GUI to be more responsive.

    • L

      Unsolved How to access the Accepted and Close Event of QDialogbox
      General and Desktop • c++ qdialog thread multithreading • • learnist

      4
      0
      Votes
      4
      Posts
      275
      Views

      SGaist

      Hi,

      In your class declaration.

      Note that this is basic C++. If you do not know that, I highly encourage you to first improve your C++ knowledge before going further.

    • L

      Unsolved How can i stop a thread running in my Dialog Class from my mainWindow
      General and Desktop • c++ qdialog qmainwindow threads • • learnist

      8
      0
      Votes
      8
      Posts
      543
      Views

      Pablo J. Rogina

      @learnist please don't double post.

    • M

      Unsolved How to change the width of QDialogbox with the click of a button
      General and Desktop • c++ qdialog size • • Mr-Workalot

      2
      0
      Votes
      2
      Posts
      215
      Views

      Pl45m4

      @Mr-Workalot

      First of all, it seems that you don't use any layouts.
      Secondly, don't hide your widget by just resizing your dialog (if you are trying to do that). Better hide the widget itself.

      To set a width anyway, you can use
      QWidget::resize(int w, int h)

    • M

      Unsolved Can i have multiple Qdialog boxes along with my Mainwindow in my application ??
      General and Desktop • c++ qlistwidget qdialog • • Mr-Workalot

      3
      0
      Votes
      3
      Posts
      471
      Views

      mrjj

      Hi
      The downside of having 22 dialogs is all the .cpp and .h you get and also adding new features, say you want to have an image of the
      dish at some later point you would have to add this 22 places.

      For your use case, it sounds like data driver would be much better.
      Meaning you have just one dialog and then based on the data structure where you keep the information about
      the recipes, you add the needed EditLines at runtime.

      SO as @JonB asks, are they that special each of the dishes that you cant handle them very much the same?