Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
82.8k Topics 452.8k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked
    29
    3 Votes
    29 Posts
    28k Views
    A

    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible.

    Thanks for reporting this.

  • 0 Votes
    1 Posts
    5 Views
    No one has replied
  • 0 Votes
    2 Posts
    8 Views
    Christian EhrlicherC

    @Will said in Radio button circle becomes colored in when using a scroll area Qt6 on Windows:

    Question 1: Is this normal / expected?

    Yes since it's the windows 11 style

    Question 2: Can this be turned off?

    Yes, use the windowsvista style: https://doc.qt.io/qt-6/qstyle.html#setting-a-style

  • UI Builder

    Unsolved
    14
    0 Votes
    14 Posts
    175 Views
    Y

    Ok. is it ok if I post a screenshot of MainMenu here ?

  • Qt 6 CUDA to OpenGL performance loss

    Unsolved
    2
    0 Votes
    2 Posts
    14 Views
    SGaistS

    Hi and welcome to devnet,

    Intriguing issue ! I would recommend bringing it to the interest mailing list. You'll find there Qt developers/maintainers. This forum is more user oriented.

  • Background of Icon on a QPushButton

    Unsolved
    4
    0 Votes
    4 Posts
    103 Views
    Christian EhrlicherC

    @petterPan said in Background of Icon on a QPushButton:

    you can do this by using QSS

    Yes, see the documentation: https://doc.qt.io/qt-6/stylesheet-examples.html#customizing-qpushbutton
    For the different states you can use the pseudo states described here: https://doc.qt.io/qt-6/stylesheet-reference.html#checked-ps

  • 0 Votes
    5 Posts
    126 Views
    S

    Thanks for the message @jsulm & @Christian-Ehrlicher

  • binary builds missing for macos

    Solved
    6
    0 Votes
    6 Posts
    187 Views
    G

    Turns out, that I'm just too stupid :-) macos builds have been renamed to "Desktop".

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • QAbstractListModel with QObject::event()

    Solved
    3
    0 Votes
    3 Posts
    68 Views
    R

    The correct solution in my scenario is to install an event filter.

    void SplashScreenListModel::append(const QString& name, QObject* item) { // Get dynamic property initialized value // If the returned variant is invalid, the property is not set yet QVariant v = item->property("initialized"); bool initStatus = false; if (v.isValid() && v.value<bool>()) initStatus = true; s_instance->beginInsertRows(QModelIndex(), s_instance->m_data.length(), s_instance->m_data.length()); s_instance->m_data.append(SPDataItem(name, item, initStatus)); s_instance->endInsertRows(); // Set name for identification in slot item->setObjectName(name); // Install eventfilter item->installEventFilter(s_instance.get()); } bool SplashScreenListModel::eventFilter(QObject* obj, QEvent* event) { if (event->type() != QEvent::DynamicPropertyChange) return QObject::eventFilter(obj, event); // Default processing // We have a QDynamicPropertyChangeEvent at hand QDynamicPropertyChangeEvent* pc = static_cast<QDynamicPropertyChangeEvent*>(event); // Not the correct dynamic property if (pc->propertyName() != "initialized") return QObject::eventFilter(obj, event); // Default processing // Value is false if (!obj->property(pc->propertyName()).value<bool>()) return true; QModelIndex idx = indexByName(obj->objectName()); setData(idx, true, SplashScreenListModel::InitializationRole); return true; }
  • stylesheet: etch around widget?

    Solved
    3
    0 Votes
    3 Posts
    69 Views
    D

    OMG QFrame!

  • Problem with graphics display in buttom after OS update

    Unsolved
    2
    0 Votes
    2 Posts
    39 Views
    SGaistS

    Hi and welcome to devnet,

    Which version of Qt are you using ?

  • 0 Votes
    2 Posts
    41 Views
    SGaistS

    Hi,

    You should run your application through a debugger. There's likely something else at play as emitting a signal without connection should not trigger any dangerous code path.

  • MacOS and MS Shell Dlg 2

    Unsolved
    8
    0 Votes
    8 Posts
    186 Views
    PerdrixP

    I also found Segoe UI as well as MS Shell Dlg 2 both of which are windows specific. What should I use to replace these?

  • .natvis Support for QJson Classes

    Unsolved
    3
    0 Votes
    3 Posts
    71 Views
    J

    @Pl45m4 Thanks for repsonding. I luckily found that repo yesterday and used the file but Visual Studio throws an error in the output and tells me that the "QCborContainerPrivate is undefined" yet in the watcher, it labels the unknown type as such. I'm currently back at square one it seems.

  • QTableView: hide vertical lines on windows?

    Unsolved
    14
    0 Votes
    14 Posts
    254 Views
    D

    i have 6.9 beta 2, it is NOT fixed.
    are you talking about 6.9 beta 3?

  • Procedure Entry Point Error in EXE After Deployment

    Unsolved
    4
    0 Votes
    4 Posts
    83 Views
    aha_1980A

    @Signal_Slayer: get_default_resource is from the C++ standard library. Check if you have deployed the MinGW runtime libs (like libstdc++-6.dll and libgcc_s_dw2-1.dll)

    You should find them in c:\Qt\Tools\mingw1120_64\bin or whereever your MinGW is installed.

    Regards

  • New file fails to register to QML module - how to debug?

    Solved
    7
    0 Votes
    7 Posts
    218 Views
    A

    @Redman Thanks, but unfortunately, there is no portable version of this header file available...

  • Stylesheet for a subset of widgets

    Solved
    12
    0 Votes
    12 Posts
    228 Views
    S

    @Simplicius-Simplicissimus said in Stylesheet for a subset of widgets:

    I see that my attitude originates from a time when I participated in the production of generated code and drafted documentation for a Design Pattern course. Mission statements like “Aggregation is better than Inheritance” left their mark.

    I know that currently there is a strong push against traditional OOP, especially inheritance. Inheritance is not a silver bullet and sometimes there are better solutions. But also, never using inheritance is also not a silver bullet. I'm not saying you should use inheritance instead of aggregation in general, but rather you should make an informed decision (instead of just blindly following rules like "Aggregation is better than Inheritance").

    @Simplicius-Simplicissimus said in Stylesheet for a subset of widgets:

    Qt has nothing to do with that.

    Actually, Qt has something to do with that. Qt does not use interfaces/abstract classes. This is a design decision that was made and you have to conform to this with your own classes. Qt dictates that you MUST use inheritance instead of aggregation/composition. If you want to use Qt it is not your choice anymore (except for classes that don't directly interact with the Qt eco system).

    As you have mentioned interfaces are implemented as abstract classes in C++. The mechanism is still inheritance to implement an interface. You gain nothing by using interfaces instead of just regular inheritance in C++. As I said before, you'd need to forward a lot of member functions when using aggregation. Nobody wants to write that much code! And with the design Qt has chosen you certainly don't need any dynamic_casts. Don't go through the trouble of rewriting Qt to use interfaces instead, just because of some stupid rule (most "rules" should actually be "guidelines"). BTW, the original design pattern book just collected patterns they observed in existing source code and gave them a name. The authors never said to force the patterns everywhere in your own code. If a pattern solves your problem–good, use it. But don't try to use as many patterns as possible. This was never the intention. Use them as guidelines.

  • 0 Votes
    6 Posts
    141 Views
    jsulmJ

    @nicker-player said in how to change the position of the menu popped by the qpushbutton?:

    it is not the operating system default style

    What is your OS?
    Did you do any styling already in your app?
    There is documentation which should answer your question: https://doc.qt.io/qt-6/stylesheet-examples.html#customizing-qcombobox