Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Slots in the second window?

    Unsolved
    11
    0 Votes
    11 Posts
    629 Views
    KroMignonK
    @RootLearner said in Slots in the second window?: When receive slot is called, the ui is not updated but when I close the window, the qDebug in "opening movielist" and case 0 is run. How do I solve this? I need it to update the ui as per the integer passed via signals. For me it looks like there is a forever loop which locks the thread event loop. The emitted signals are stored in event loop, but as the thread is lock in a forever loop, the associated slots are called when forever loop ends and event loop is running. What are you doing in movie class?
  • What decides where a native event gets sent?

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    S
    @Qt_User72653 Dear bro, I know this topic is a little bit old, but could you please elaborate how you fixed it, when and where should I use effectiveWinId() instead of winId(), and do I need to set the Qt::WA_DontCreateNativeAncestors attribute on the widget? I've been lost for quite a few days :(
  • 0 Votes
    2 Posts
    238 Views
    jeremy_kJ
    The easiest method is to run the Qt portion in its own thread, allowing QCoreApplication::exec() to block without interfering with the non-Qt portion of the program. At the other end of the spectrum QAbstractEventDispatcher enables integrating with another event loop in the same thread. Calling QCoreApplication::processEvents() can work, but as the documentation puts it: Use of this function is discouraged. Instead, prefer to move long operations out of the GUI thread into an auxiliary one and to completely avoid nested event loop processing. If event processing is really necessary, consider using QEventLoop instead.
  • QModelIndex.internalPointer() returning random objects and crashing - PySide2

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    T
    Necroing the old thread, but since I ran into at least a similar issue, I figured I'd respond to hopefully give closure. As above, I was getting a random object out of internalPointer. The cause of the issue is that pyside2 does not maintain a handle of the object so Python was destroying the objects between creating the index and accessing them later.
  • 0 Votes
    5 Posts
    393 Views
    C
    @SGaist I'll try doing that. The ESC capture must be done inside the editor used to enter new data, so I'll probably have to install the event filter in the delegate used to generate the editor. I'll see what I can do and post the results later.
  • How to configure the QT in Mac OS

    Unsolved
    2
    0 Votes
    2 Posts
    173 Views
    SGaistS
    Hi and welcome to devnet, What are the arguments you passed to configure ? What kind of machine are you using to build Qt ?
  • setupUi is not a member of my QT application

    Unsolved
    41
    0 Votes
    41 Posts
    6k Views
    L
    @JoeCFD I was able to edit the xml and change my widgets section to be a QWidget and I'm dealing with some other errors from here. Thanks
  • Qt Creator fails to launch on Ubuntu 20.04

    Unsolved
    3
    0 Votes
    3 Posts
    243 Views
    JoeCFDJ
    @MSimpson said in Qt Creator fails to launch on Ubuntu 20.04: commercial Qt Install commercial Qt Install: does Qt offer any support?
  • QTreeview Drag and Drop restrict to depth level[movement between siblings]

    Unsolved
    2
    0 Votes
    2 Posts
    173 Views
    SGaistS
    Hi, You need to write your own dropEvent and handle there your specific conditions.
  • Convert QFont styleName to stylesheet

    Unsolved
    6
    0 Votes
    6 Posts
    592 Views
    JoeCFDJ
    @AlexNevskiy It is true. And it is the same with stylesheet.
  • No appropriate default constructor available

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    KroMignonK
    @lfreeman6490 I don't know anything about the software you are trying to build. So I can only guess. I am very sorry, my first answer was not correct. I was not take in account that you are using Qt UI Designer! The Ui namespace is used by Qt Creator / UI Designer to group auto-generated Pathloss code in one namespace. It helps to differentiate between the ui class that is generated from designer ui file and the class that implements the functionality. So the idea, is that you will have: Ui::Pathloss which holds the UI as created with designer Pathloss which is the QWidget which will build the widget, it will hold an instance of Ui::Pathloss to build the widget content You can read this article to have more details about this: https://www.meetingcpp.com/blog/items/an-introduction-into-qt-part-ii.html So you could better understand how it works, and how you have to make the modifications you want to do.
  • Differences between CSS styling QDialog and QWidget

    Unsolved
    1
    0 Votes
    1 Posts
    155 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Different Font Color and Style, QStandardItem

    Solved qstylesheet qstandarditemm
    11
    0 Votes
    11 Posts
    3k Views
    Q
    If i'm not define the StyleSheet for item, then work initStyleOption() from delegate. Thank you.
  • Add special characters as text to QTextEditor or other widgets

    Unsolved
    15
    0 Votes
    15 Posts
    972 Views
    Q
    @Pl45m4 I have incoming data in QString format...
  • Desaturating an image?

    Unsolved
    3
    0 Votes
    3 Posts
    379 Views
    D
    Thanks very much, not sure how I didn't find that in my searching. In the meantime it turned out to be quite easy to code it myself, and I ended up knocking up a function which could vary the saturation, rather than just making it greyscale. Here's the code below in case anyone finds it useful. img is a QImage and v is a float. v=0 will give black and white, v=0.5 will halve the colour saturation. v=2 will double the saturation, but I haven't added any min() or max() in the example so that would need to be added if v>1. for x in range(0, img.width()): for y in range(0, img.height()): c = img.pixel(x, y) r1, g1, b1 = qRed(c), qGreen(c), qBlue(c) grey = (r1 + g1 + b1) / 3 r2 = grey + (v * (r1 - grey)) g2 = grey + (v * (g1 - grey)) b2 = grey + (v * (b1 - grey)) img.setPixel(x, y, qRgb(int(r2), int(g2), int(b2)))
  • QSlider valueChanged connection not working

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    SPlattenS
    @SPlatten , What I found that works: QObject::connect(truth::mspSpinMax, QOverload<int>::of(&QSpinBox::valueChanged), [this](int intValue) { emit maximumChanged(intValue); } );
  • pthread_spin_lock() segmentation error in Qt5Widgetsd.dll

    Unsolved
    2
    0 Votes
    2 Posts
    229 Views
    jsulmJ
    @Rapidrain Did you try with a more recent Qt and MinGW versions?
  • Overriding ensureVisible on QGraphicsObject

    Unsolved
    1
    0 Votes
    1 Posts
    112 Views
    No one has replied