Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • [Moved] highlighting the icon

    3
    0 Votes
    3 Posts
    2k Views
    G
    Moved to the General forum and deleted the double post there. Please leave a note here, moderators are happy to move a thread to the appropriate forum. Don't open a second thread with the same content. Thanks.
  • Regular expression help needed

    10
    0 Votes
    10 Posts
    4k Views
    G
    It is up to you to detect what's a "subline" and skip the regex on that alltogether. I recommend to study the [[Doc:QString]] documentation. It has various helpful methods. Read through the method list and descriptions.
  • QSlider is not sliding

    2
    0 Votes
    2 Posts
    3k Views
    A
    Maybe you lost your focus. And every time when you click on slider it has focus, then change value and then again lost it's focus.
  • Converting qstring into qlist

    7
    0 Votes
    7 Posts
    17k Views
    ?
    Just another example, this time taking control over more than one space between entries. @QString inputString = "1 3 5 6 2 4"; QStringList listProcessing; QList<int> sortedList; bool conversionState = true; listProcessing = inputString.split(" ", QString::SkipEmptyParts); listProcessing.sort(); for(int index = 0; index <= (listProcessing.size() - 1); ++index) { sortedList.append(listProcessing.at(index).toInt(&conversionState)); if(!conversionState) break; }// for if(!conversionState) { // Handling the conversion error. ... }// if@
  • How to build Win64 project using Win32 OS.

    10
    0 Votes
    10 Posts
    7k Views
    A
    I executed set QTDIR= E:\Compiler\QT\4.7.4_x64 set PATH= E:\Compiler\QT\4.7.4_x64\bin;PATH set QMAKESPEC=win32-msvc2010 E:\Compiler\MSVC100\VC\vcvarsall.bat x86_amd64 E:\Compiler\QT\4.7.4\bin\qmake.exe ..\myqt.pro -o qmyqt.lnk -spec win32-msvc2010 but in qmyqt.lnk.Debug INCPATH still INCPATH = -I"c:\Qt\4.7.4\include\QtCore" .......
  • Mouse/kb events not handled until alt+tab?

    3
    0 Votes
    3 Posts
    2k Views
    R
    Hi, thanks for the suggestion! Actually repaint() causes a repaint immediately, which is what might be causing the problem. But in looking at the docs again, I wondered why I'm even calling updateGL() directly. Changing this to update() causes the new QGLWidget version to behave like the old version, which solves my immediate problem. It seems to me now, though, that all versions are overloading something, probably message handling, as the UI is sluggish. If I have time, I might look at moving gl rendering to a separate thread to keep the UI responsive. Thanks again!
  • How to located image files for MAC?

    5
    0 Votes
    5 Posts
    3k Views
    C
    Okay. Thanks. Have a good week.
  • Colliding Mice Qt 4 example question

    4
    0 Votes
    4 Posts
    2k Views
    S
    Thank you both so much for the information! sb
  • [Solved] [Moved] cannot declare QDeclarativeView into stack

    7
    0 Votes
    7 Posts
    3k Views
    G
    Then you have to add a member variable to your class: header file @ class musica1: public QWidget { // ... private: QDeclarativeView *view; }; @ implementatino @ musica1::musica1(QWidget *parent) : QWidget(parent) { view = new QDeclarativeView(QUrl::fromLocalFile("qml/Werfer/FliegendeLieder/musica1.qml"), this); this->setAttribute(Qt::WA_LockLandscapeOrientation); // ... } void musica1::someMethod() { view->doSomething(); } @ That's pretty basic C++ stuff, so I've moved it to the General forum.
  • Resolved:What is the QMatrix of QT3.3 replaced by, in Qt4?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    E
    [quote author="peppe" date="1326633043"]It's not an overkill! Use a proxy model right between the tree view and the original model.[/quote] I actually started with subclassing QItemDelegate, overriding the paint function and I'm realizing that might be a more complex solution. I have successfully made it display the text the way I want it, but I haven't been able to make it show the graphical theme you get by default (mouse over effects and such). Looks like I don't have access to some of the functions like 'textRectangle' and 'decorationRectangle' in PyQt (I just noticed the language bindings board, a mod may move this) so it might be a little tricky. Would the "QIdentityProxyModel":http://developer.qt.nokia.com/doc/qt-4.8/qidentityproxymodel.html be a good choice for this?
  • Moving direction of QSlider

    4
    0 Votes
    4 Posts
    3k Views
    A
    Please show your code then, because comparing the value would be the most obvious solution.
  • Wake up device (N9) when external alarm is triggered

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [Solved] Recommended approaches to plotting points in 3D

    2
    0 Votes
    2 Posts
    4k Views
    M
    Starting to get things working now, using QGLWidget and drawing circular "points" using glPointSize() and glEnable(GL_POINT_SMOOTH) functions. I found "this example":http://www.civilnet.cn/book/embedded/gui/qt4/ch08lev1sec5.html a helpful starting point.
  • [Solved, Moved] More memory needed&#63;

    11
    0 Votes
    11 Posts
    4k Views
    A
    Best way to solve these issues: make sure that you know the relevant values. Just step through the procedure with your debugger, and watch what happens. Or, perhaps just insert a bunch of qDebug() statements to print out the values of everything you touch in that piece of code. I think it would have been very easy to track this issue this way.
  • How can i set fixed height of layout?

    4
    0 Votes
    4 Posts
    5k Views
    R
    we can set the geometry of the Top Level Layout as well. ie, setGeometry of layoutWidget.
  • Draw a GIF in an OpenGL Widget

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Slider with detents?

    4
    0 Votes
    4 Posts
    3k Views
    B
    Thanks for the ideas!
  • Not able to view progressbar

    4
    0 Votes
    4 Posts
    3k Views
    R
    The tags i meant is about posting your code in the forum. like this: @QString(“QProgressBar { border: 1px solid green; background: red; padding: 1px; text-align: left ;} “)@ Okay, you have a Main Window, inside one full screen label too. Above this, about the center one progress bar which is not visible. May be it is hidden , and have you tried "QWidget::raise ()":http://developer.qt.nokia.com/doc/qt-4.8/qwidget.html#raise Alternately you can use [[doc:QProgressDialog]] too
  • 0 Votes
    3 Posts
    5k Views
    U
    Hi thanks to the replay , i implement custom QLabel with this paintevent but still it shows gray color . i suspect i messed something with the item background color that i set to gradient , i dont know ... its driving me crazy .