Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Solved]Very strong error in QSplitter

    General and Desktop
    3
    6
    3779
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Ruzik last edited by

      Hellow, i have slpitter, i set style sheet to it, add some widgets and when i compile it i see it:
      !http://hostingkartinok.com/image/01201109/d0eddbdce4b2e213722d7aa6f74b6dad.png(first)!
      After it i copy exe file in my desktop, open it and see it
      !http://hostingkartinok.com/image/01201109/bdd7e19ce54941558b698cf271d3eae9.png(second)!
      @QSplitter * splitter;
      splitter = new QSplitter(this);
      splitter->setOrientation(Qt::Horizontal);
      graphicsPlot = new RGraphicsPlot;
      functionList = new RFunctionListWidget(this);

      splitter->addWidget(functionList);
      splitter->addWidget(graphicsPlot);
      horizontalLayout_2->addWidget(splitter);
      //
      splitter->restoreState(settings.value("graphics//splitterSizes").toByteArray());
      //
      //and in global style sheet QWidget{ background: transparent;}
      splitter->setStyleSheet("QSplitter::handle{image: url(:/images/Resources/Images/slpitter.png);}");
      splitter->setFixedWidth(3);@
      I try without styleSheet, try delete ini file with splitter's state before opening, try compile in debug and release, and if i open .exe file in release folder i get second result, i thing: "maybe it is because of differnt dlls", but i use 4.7.3 qt and 4.7.3 dlls
      In advance thank you for your help!

      1 Reply Last reply Reply Quote 0
      • R
        Ruzik last edited by

        I use MSVC 2008 compiler and Visual studio for develop

        1 Reply Last reply Reply Quote 0
        • K
          koahnig last edited by

          Hi Ruzik

          apparently you have just typed the links into your post. So, the link is only shown in the post.
          If you would use the picture link button, which should be the sixth from the left above your post window, the pictures are shown directly in your post.

          This makes it easier for people to view your post. Actually I have seen it yesterday, but the pure links were my reason not to follow.

          Unfortunately, besides this formatting tip for your post, I cannot really contribute. I am typically fighting myself to get the window sizing in a way I like. :-(

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply Reply Quote 0
          • R
            Ruzik last edited by

            I change it, sorry for i dont do it before

            1 Reply Last reply Reply Quote 0
            • G
              giesbert last edited by

              Hi Ruzik,

              can you comment the line 11 (splitter->restoreState) just to check if it works then?

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply Reply Quote 0
              • R
                Ruzik last edited by

                If i do it i get second result agter compile, thats why i get first result after compile
                And i find my how i can do it:
                @ splitter->setStyleSheet("QSplitter::handle{image: url(:/images/Resources/Images/slpitter.png);}"
                "QSplitter { width: 5px; }");
                //splitter->setFixedWidth(3);@
                the problem turned so easy :)
                Many thanks for your help!!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post