Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Context menu on tree view

    11
    0 Votes
    11 Posts
    11k Views
    K
    [quote author="Rajveer" date="1337681154"]Hi In my case if i right click on root node it will not enter the below if condition @ QModelIndex index = view->currentIndex(); if(view->rootIndex() == index) { } @ And how to check for child nodes?[/quote] Well if you haven't set a root node, then of course the check performed by the first if condition will return false. And if you care to read my last post you will see that I already told you how to check for child nodes. You might want to put some effort into this yourself.
  • Qwidget as modal

    2
    0 Votes
    2 Posts
    10k Views
    sierdzioS
    Using: @ setWindowModality(Qt::WindowModal); @ in MyObj's constructor does not work?
  • Show only Icon for push button without text[solved]

    7
    0 Votes
    7 Posts
    13k Views
    V
    Hello Andre and Mabrouk, I managed to solve this problem by using QStyleOptionButton, as follows @if(!icon ().isNull ()){ QStyleOptionButton option; initStyleOption(&option); option.text = QString(""); // set the empty string so that only icon is drawn and not the text, when we specify both icon and text. if(m_mouseOverButton == true){ option.icon = icon().pixmap ( iconSize(), QIcon::Active); }else{ option.icon = icon().pixmap ( iconSize(), QIcon::Normal); } QPainter painter(this); style()->drawControl(QStyle::CE_PushButton, &option, &painter, this); //event->ignore (); }else{ QPushButton::paintEvent (event); }@ Thus when the icon is present, set the option text to empty string. This way, the original string is preserved. Thanks a lot for all the help...
  • Testing designed widgets

    5
    0 Votes
    5 Posts
    3k Views
    S
    This looks like to be a better solution. I'm going to convert project to that structure. Thank you :)
  • Resize dialog Solved

    5
    0 Votes
    5 Posts
    2k Views
    S
    Kindly edit your first post and set the title as [Solved]. Thanks.
  • Set backgroud color and Mouse hover highlighting for tabs ?[solved]

    5
    0 Votes
    5 Posts
    7k Views
    V
    Thanks a lot.. This was very useful .. :)
  • Problem 'undeclared identifier'

    6
    0 Votes
    6 Posts
    19k Views
    R
    Thank again Mr. sierdzio.. I will try. It is very nice help from you.*
  • Creating hierarchy of custom widgets

    2
    0 Votes
    2 Posts
    1k Views
    R
    It figures...I finally ask for help and then figure it out an hour later. If I add the header and source files for the base class to the subclass project, then the subclass shows up in designer. Rich
  • Texture problem with OpenGL in QT

    2
    0 Votes
    2 Posts
    2k Views
    M
    You didn't specified texture coordinates for vertices. See: http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml
  • Compile PythonQt using Qt creator

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    G
    Please, don't double post in different forums. I close this thread. Please use the folloing thear for further info: http://qt-project.org/forums/viewthread/17396/
  • [SOLVED] How to intersect two QRects from widgets with different parents?

    5
    0 Votes
    5 Posts
    3k Views
    J
    Yes I can.
  • QGLWidget::setFormat not working as expected.

    2
    0 Votes
    2 Posts
    1k Views
    R
    I am pretty sure you can not do that. However, you could try creating a root/hidden QGLWidget (and associated context) and have your QGLWidget(s) share context with that root widget. Then when you need to change the format of one widget, delete that widget and replace it with a new one using the proper format and sharing context with the hidden QGLWidget.
  • SQL widgets in QT4-designer?

    3
    0 Votes
    3 Posts
    3k Views
    L
    Thanks Tim, I'll try that approach. -Jef
  • QSslSocket

    2
    0 Votes
    2 Posts
    2k Views
    R
    Client authentication as you describe is already possible: http://qt-project.org/doc/qt-4.8/qsslsocket.html#setLocalCertificate
  • How to manipulate a very large data using QT?

    6
    0 Votes
    6 Posts
    2k Views
    A
    Ok thanks a lot Serge and Jeroente...:) I'll try now....if i face any more prblm will get back to u...
  • [SOLVED] Application not displaying .ico file format

    6
    0 Votes
    6 Posts
    6k Views
    V
    I went back and diddled around with it a little bit and found that the 2nd way worked! thank you very much for the help!
  • How to get a date and time of file creation

    6
    0 Votes
    6 Posts
    10k Views
    JeroentjehomeJ
    Well, maybe when you have files like a picture that includes information inside it you are able to get the production date, type of camera model etc. The QFileInfo just gives back the information of the file itself, so when copied the original date may be lost. Greetz
  • Download videos from youtube - help.

    17
    0 Votes
    17 Posts
    17k Views
    J
    I am having almost the same problem. I am decrypting the real URL of youtube video myself, using the same way as JDownloader, as follows: Use QNetworkAccessManager to access the HTML content of the youtube URL, say: www.youtube.com/watch?v=tBF6MA0xfps Analyze HTML and construct the video's real URL (a very long URL). After the above two steps, I could get the video's real URL as well QNetworkCookieJar from the QNetworkAccessManager I used. However, I got ERROR 202 from QNetworkReply when try to download from the real URL using the same QNetworkAccessManager and the same QNetworkCookieJar. The decrypted URL could be directly played by Chrome, Safari, VLC, or downloaded by wget, curl, and libcurl. This means that accessing the decrypted URL does not require cookie magic. I tried using the same or different QNetworkAccessManager with the same or different QNetworkCookieJar to access the decrypted URL. But I always got error 202. There must be some bugs in QNetworkAccessManager. I also tried Qt 4.8.1 on Windows 7, and Qt 4.7.4 on Mac OS X 10.7, but got the same error 202. I think the bug is probably in Qt's OS-independent code path.
  • [solved] Date one week back

    3
    0 Votes
    3 Posts
    1k Views
    T
    Great! Apparently the solution was too simple for me to find... Thank you! -RS
  • 0 Votes
    3 Posts
    3k Views
    S
    From Microsoft Dev Center: bq. Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, ".temp". Source: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#file_and_directory_names