Skip to content
QtWS25 Last Chance
  • Grid layout reordering after modifications

    Unsolved General and Desktop gridlayout widgets
    15
    0 Votes
    15 Posts
    6k Views
    mrjjM
    @kshegunov I agree . must been something like that as now the effect is 100% as your experience. Even in designer. Sorry for the confusion.
  • 0 Votes
    8 Posts
    3k Views
    kshegunovK
    @raven-worx Hello, Thanks for the code, but I know how to do the scheduling. I actually went with QPointer<QObject> since the QObject might be deleted while waiting in the event loop. Like this: bool AgDial::eventFilter(QObject * object, QEvent * event) { switch (event->type()) { case QEvent::ChildAdded: QMetaObject::invokeMethod(this, "scheduleChildAdd", Qt::QueuedConnection, Q_ARG(QPointer<QObject>, QPointer<QObject>(reinterpret_cast<QChildEvent *>(event)->child()))); break; case QEvent::ChildRemoved: d()->detachAction(reinterpret_cast<QChildEvent *>(event)->child()); break; } return QStackedWidget::eventFilter(object, event); } Thanks for taking the time though! Kind regards.
  • 0 Votes
    4 Posts
    6k Views
    SGaistS
    You'r welcome ! Since you have it working now, please mark the thread as solved using the "Topic Tool" button so other forum users may know a solution has been found :)
  • Pushing code for review

    Solved Qt Contribution gerrit git gui widgets qpa
    15
    0 Votes
    15 Posts
    7k Views
    kshegunovK
    @SGaist Ok. Thank you!
  • Drawing a virtual mouse cursor

    Unsolved General and Desktop widgets mouse mouse control cursor
    2
    0 Votes
    2 Posts
    2k Views
    No one has replied
  • Restrict mouse cursor movement

    Solved General and Desktop widgets main window mouse mouse control
    14
    0 Votes
    14 Posts
    14k Views
    W
    more cursors [EDIT: Irrelevant link removed --JKSH]
  • 0 Votes
    10 Posts
    5k Views
    mrjjM
    @kshegunov well you are not the first :) At all.
  • Form compiler adds unneeded layout

    General and Desktop widgets layout forms
    3
    0 Votes
    3 Posts
    1k Views
    kshegunovK
    Hello, Thanks for taking the time to welcome me into the forums and write about my question. I will then make a placeholder widget, as you suggested, and take it from there. Kind regards.
  • Widgets in OpenGL.

    Unsolved General and Desktop widgets opengl
    7
    0 Votes
    7 Posts
    4k Views
    K
    I don't know, there are too many options. I will definitely need relative complex GUI (similiar to IDE) and i want my custom look (app should look same on all platforms). I would do it even in Qt Quick 2 and QML, but i can't find any complex app made in it to see how it is responsive, if the UI is without delays. Somewhere in that mailing list i found one time that the QML is good for small embedded applications, but not play very well on big complex apps on desktop. I will probably go with Qt Widgets and use that QWidget::createWindowContainer, because i can say that if there will be some GL content in my app, it will be the "center widget" in my app. Hope there will be not much flickering when resize/show/hide that native widget.
  • Qt Widgets on OpenGL?

    Unsolved General and Desktop opengl widgets bad-english
    1
    0 Votes
    1 Posts
    779 Views
    No one has replied
  • Is QML the Future of Qt Widgets?

    QML and Qt Quick qml widgets roadmap
    2
    0 Votes
    2 Posts
    3k Views
    JKSHJ
    Hi @maximo, I wanted to know if the roadmap of Qt is to phase out Qt widgets and run everything through Qt Quick in the future? There are currently no plans to phase out Qt Widgets. Widgets are a very mature and useful technology, with different use cases from Qt Quick currently (Qt Widgets are suitable for static office-style GUIs, while Qt Quick is suitable for fluid mobile-style GUIs). Work is being done to make Qt Quick reach the same level of maturity as Qt Widgets, but there is still a long way to go. I think Qt Quick won't be ready to fully replace widgets for another 7 years, at least. Anyway, Qt Widgets even got some new features for the upcoming Qt 5.6 release: http://wiki.qt.io/New_Features_in_Qt_5.6 The other thought going through my mind is that if Qt Quick is the future, and it's rather limiting versus just building the interface in QWebView (which uses Chromium), then why not go with QWebView? For instance, I can draw complex interfaces with charts and 3D graphics far easier (and have far more examples) that work inside Chromium (and thus QWebView) than in Qt Quick. The other great thing is that UI coders these days understand web UIs far more than they do C++ UIs, which means we can leverage that skillset better on a C++ project if we use QWebView. First, let's clarify some points: "Qt Quick" refers to the basic visual components for GUI creation. The underlying language is QML (more on this later) QWebView is based on Qt WebKit (now deprecated). It's QWebEngineView that is based on Chromium. In general, I think using well-known standards is a very good idea. However, there's one major obstacle that prevents us from replacing everything with Chromium: Apple doesn't allow it on iOS (which is an important target for Qt). Another disadvantage of using Chromium is that it's harder to integrate with C++. In contrast, QML was designed with C++ integration in mind. So, it's easy for developers to write complex, high-performance business logic in C++ while using Qt Quick for the GUI. This is what Google did with their VoltAir game: http://blog.qt.io/blog/2014/07/21/google-labs-voltair-game-built-with-qt/ Also, note that there are QML modules which are not part of Qt Quick. For example, Qt Canvas 3D brings WebGL features to QML, but it doesn't use Qt Quick: https://blog.qt.io/blog/2015/05/27/introducing-qt-canvas3d/ Anyway, QML should be quite easy for web devs to learn. The QML language is heavily influenced by CSS and JSON, and it incorporates JavaScript.
  • 0 Votes
    1 Posts
    575 Views
    No one has replied
  • 1 Votes
    2 Posts
    959 Views
    Y
    Had similar problem. Source turn out to be my ubuntu 23 which was newer then official supported 22 LTS. Reinstaling system to 22 LTS helped.
  • 0 Votes
    2 Posts
    2k Views
    SGaistS
    Hi, You can add a stretch before or after the button so it will be pushed against a border. For your second question, you can again use the stretch like described here
  • Custom Widget Class Properties

    General and Desktop widgets
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    I missed the point about the Property Explorer, I'm really not sure it can handle an embedded object like that. The setter follows the same logic as any other property: setReadPropTest(TPropTest *tPropTest);
  • QStackedWidget hiding pages

    General and Desktop qstackedwidget page widgets
    2
    0 Votes
    2 Posts
    2k Views
    R
    My first thought is that QGroupBox probably provides a sizehint() that is zero if the widget is not visible where your other widget probably does not do this. The QStackedWidget would provide a sizehint() based on all of the children. When you hide the children you make the end result no smaller than the largest child. Another idea to implement this is to have a common set of options always visible and show/hide the additional parts that are unique to the 'multi' and 'other' views. This will autosize.
  • Multiple Widget Containers

    General and Desktop widgets dynamic
    5
    0 Votes
    5 Posts
    3k Views
    mrjjM
    @Basstrom Hi both ways would work with different information. It is possible to give each widget a name with number if needed. But if you are aiming for something that would be a table then it is far more work to create a widget for each column than to use a QTableWidget as sgaist suggests. ui->table->setRowCount ( 1 ); ui->table->setColumnCount ( 3 ); ui->table->setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ); ui->table->setHorizontalHeaderLabels ( QString ( "Name;Track Time;Prev Track Time" ).split ( ";" ) ); //Add Table items here ui->table->setItem ( 0, 0, new QTableWidgetItem ( "Michael Schumacher" ) ); ui->table->setItem ( 0, 1, new QTableWidgetItem ( "22.55" ) ); ui->table->setItem ( 0, 2, new QTableWidgetItem ( "44.3" ) );
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Using QOpenGLWidget

    Game Development qopenglwidget opengl opengl es2.0 widgets
    2
    0 Votes
    2 Posts
    2k Views
    D
    http://www.trentreed.net/blog/qt5-opengl-part-0-creating-a-window/ Follow thoose tutorials or at least the part 0, 1 ,2 ,3a, 3b and you will have decent basis to start. In the tutorial he use QOpenGLWindow which isn't really far from QOpenGLWidget so I think you should be able to adapt his code a bit to suit your need but if you didn't succed to do it ask here again. Do you look for opengl ressources to ?
  • 0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, It's described here for both